System for graphics processing employing semiconductor device

ABSTRACT

A graphics processing system which employs one or more frame buffer memory devices is disclosed which system provides accelerated rendering of two-dimensional and three-dimensional images. One embodiment of the disclosed system comprises a rendering controller, an interface, a frame buffer memory, a rendering bus and an address and control bus.

This is a continuing application of Provisional Patent Application Serial No. 60/086,554 filed May 21, 1998.

FIELD OF THE INVENTION

The disclosed invention relates generally to computer systems. More particularly, the present invention relates to a dynamic random access memory (DRAM) frame buffer device, and system based on that device, which provides an architecture for performing accelerated two-dimensional and three-dimensional graphics rendering operations.

BACKGROUND

The Dual Pixel 3DRAM chip and graphics processing system is used to implement high performance, high capacity frame buffers. Certain aspects of the disclosed Dual Pixel 3DRAM chip, and graphics processing system based upon the Dual Pixel 3DRAM chip, are disclosed in U.S. Pat. No. 5,544,306, issued to Deering et al. on Aug. 6, 1996, which patent is incorporated by reference in its entirety into this disclosure as if it were fully set forth herein.

The disclosed invention presents an alternative to the use of external DRAM frame buffers. To meet near term performance objectives, it is tempting to use embedded DRAM for frame buffer memory, because it might be feasible to fit between 4 and 8 Megabits on a die with surface area remaining to implement an interesting amount of logic. However, in the same time frame, graphics-oriented computing products will require between 10 and 80 Megabits of frame buffer memory. Thus, between 2 and 10 embedded DRAM devices would be necessary to implement a frame buffer that would meet the requirements of graphics processing computing systems. While the fill rate for such a frame buffer would be very high, the cost would be prohibitive for a large segment of the computing market.

In processing two-dimensional and three-dimensional graphic images, texture mapping must be accelerated to match fill rate. However the distributed frame buffer described above makes this difficult to do efficiently. The easiest way to distribute texture data would be for each device to have its own copy of everything, however this method is a very inefficient use of embedded DRAM bits. An alternate approach would distribute texture data among the devices comprising a frame buffer such that data is not duplicated. This alternative would use embedded DRAM bits efficiently, but would also requires the routing of massive amounts of texture data between devices.

Using embedded DRAM to implement a texture cache on a single device might be more practical. Texture data would have to be paged in from system memory, which would work more efficiently if the texture data were compressed.

Embedded DRAM could also be used to implement a primitive FIFO between the setup unit and the rasterizer. This FIFO would allow geometry and setup processing to continue while big triangles are being rendered. It could also be used to tolerate the latency of paging and decompressing texture data in from system memory.

Region-based rendering architectures, such as Talisman, PixelFlow, or Oak's WARP 5, render a small portion of the frame buffer on the rendering controller and then transfer the final color values to external DRAM. The controller then renders the next region, and the one after that, until the entire frame is covered.

All of the bandwidth used for hidden surface removal and anti-aliasing remains entirely on the rendering controller, so fill rate is not limited by external bandwidth. All of the storage used for hidden surface removal and anti-aliasing needs only to be implemented for a small portion of the frame buffer and can be kept on the rendering controller.

The big disadvantage of region-based rendering is that all of the geometry for a frame needs to be sorted into regions and stored somewhere before rendering can begin. This requirement generally places an upper limit on the amount of geometry that can be rendered per frame. This limitation is unacceptable for many applications. Some region-based rendering architectures can still function somewhat correctly when given too much geometry, by writing depth and color values for regions to and from external DRAM. However, this implementation loses all of the benefits of region-based rendering, while retaining all of the disadvantages.

Mechanical CAD and other content creation applications cannot tolerate limits on geometric complexity. Such applications require the ability to smoothly trade off geometric complexity for frame rate. Thus neither embedded DRAM nor region-based rendering approaches provide adequate solutions to meet the performance demands and practical cost constraints of present graphics processing applications.

Another concern with respect to frame buffer design is the performance trade off between single-ported and dual-ported frame buffer memories. Dual-ported frame buffers have a dedicated display port which enables the render port to spend more of its time rendering. Typically, a dual-ported frame buffer comprised of video random access memory (VRAM) chips loses only approximately one to two percent of its fill rate to video transfer operations, because its video buffers are quite large. Frame buffers comprised of FBRAM chips (also referred to as 3D-RAM™ chips) lose approximately five to ten percent of their fill rate to video transfer operations, because their video buffers are smaller.

A single-port memory cannot render when it is reading pixel data for display, unless the port supports high speed, bidirectional signaling. If one compares single- and dual-ported memories where both render port bandwidths are identical, then the dual-ported memory will have both a higher fill rate and a higher cost. If one compares single- and dual-ported memories where the bandwidth of the single port is equal to the sum of the dual-port bandwidths, then the single-ported memory's fill rate is likely to be higher than the dual-ported memory, because the single-ported memory is more efficient. Thus, to the extent that bandwidth limitations are presently being relaxed due to the emergence high bandwidth input/output (I/O) capacities, a single-ported memory architecture promises more efficient frame buffer performance.

Dual-ported memories allow a smoother flow of pixels to the frame buffer. A single-ported memory is unavailable for rendering on a periodic basis while it reads bursts of display data. The rendering controller requires a larger pixel FIFO to smooth out pixel flow when interfacing with a single-ported memory. In a lower cost system, the renderer may be idle during such display bursts.

A single-ported memory is cheaper due to savings in die area, pins, packaging, testing, and power consumption. A single-ported memory has a significantly lower cost per bit of storage than a dual-ported memory of the same size. If the cost per bit is lower, storing non-displayable data in the frame buffer is easier to justify.

A dual-ported memory has a fixed display bandwidth. If the required display bandwidth is lower, then bandwidth is being wasted. If the required display bandwidth is higher, then the memory is not suited to the display requirements. A single-ported memory has the flexibility to trade off render bandwidth and display bandwidth. In a pinch, a single-ported memory can actually provide much higher display bandwidth.

The dedicated display port of a dual-ported memory is not used during horizontal and vertical blanking intervals, which means the display port is idle approximately twenty percent of the time.

A dual-ported memory dictates a fixed mapping of pixels and blocks to the screen. A single-ported memory can map pixel and blocks to the screen with much greater flexibility.

A dual-ported frame buffer memory only makes sense if the render and display ports are connected to different chips. If both ports are connected to the same chip, then a single-port memory, with equivalent bandwidth, would be more efficient for the reasons stated above.

A single-ported memory enables the building of lower cost systems, because the cost per bit of frame buffer storage is cheaper, and because the rendering and display chips can be merged into a single device.

Thus, a single-ported memory enables one to design lower cost, low-end systems than could be designed with a dual-ported memory. The cost per bit of storage is significantly lower with a single-ported memory which will make the bill of materials significantly lower for high resolution/high pixel depth designs. Due to its greater flexibility, a single-ported memory yields a design which offers a wider range of product capabilities.

SUMMARY OF THE INVENTION

The present invention is directed to a single-ported frame buffer access memory (Dual Pixel 3DRAM) chip which provides accelerated rendering of two-dimensional and three-dimensional images in a computer graphics system.

The Dual Pixel 3DRAM chip features a single-ported, high speed memory which is accessed by a rendering controller over a rendering bus. The Dual Pixel 3DRAM chip comprises a DRAM array, an SRAM pixel buffer, at least one pixel arithmetic-logic unit (ALU), and a global bus. The Dual Pixel 3DRAM chip also comprises a number of data buses and data formatters which route and format graphics data as that graphics data is processed, updated, transmitted off of, and stored within the Dual Pixel 3DRAM chip.

In a first aspect of the present invention, the Dual Pixel 3DRAM chip is configurable to process varying pixel sizes and formats, ranging from 8-bit pixels up to 512-bit pixels. The Dual Pixel 3DRAM chip features novel protocol and data packing schemes to implement these capabilities.

In another aspect of the present invention, the Dual Pixel 3DRAM chip supports variable input and output data rates over the rendering bus, which permits both 2-cycle and 3-cycle pixel ALU operations on the chip.

In another aspect of the present invention, the Dual Pixel 3DRAM chip processes two separate pixels or samples per operation simultaneously.

In another aspect of the present invention, the Dual Pixel 3DRAM chip features data compression capabilities which permit higher fill rates and throughput between the chip and the rendering controller.

In another aspect of the present invention, the Dual Pixel 3DRAM chip employs a multi-sampling scheme which employs a novel delta Z algorithm to render antialiased polygons.

In another aspect of the present invention, the Dual Pixel 3DRAM chip employs a novel scheme for retaining DRAM bank and column addresses on-chip to minimize bandwidth requirements over the address and control bus between the rendering controller and the chip.

In another aspect of the present invention, the Dual Pixel 3DRAM chip comprises a relationship between data transfer speed and width of the data buses internal to the chip, such that bandwidth is balanced to optimize the operational efficiency of the chip.

In another aspect of the present invention, the Dual Pixel 3DRAM chip performs multi-precision pixel blend operations such that inputs of any bit width may be blended.

In another aspect of the present invention, the Dual Pixel 3DRAM chip divides address and control information into three separate sets of signals which are simultaneously transmitted to control DRAM bank operations, global bus operations, and pixel AlU operations on the chip.

In another aspect of the present invention, the Dual Pixel 3DRAM chip features a Flash Line operation which writes to multiple buses between DRAM bank column decoders and sense amps resulting in an increase in the clear rate of the frame buffer by a factor of four or more.

In another aspect of the present invention, the Dual Pixel 3DRAM chip features a novel operation, Change Cache Line, which permits simultaneous transfer of data between different levels of cache due to a bi-directional global bus between the DRAM array and the SRAM pixel buffer.

In another aspect of the present invention, the Dual Pixel 3DRAM chip features a Change Page bank operation in which the precharge page and the access page bank operations are combined into a single operation.

In another aspect of the present invention, the Dual Pixel 3DRAM chip features pixel ALU operations in which data or the contents of certain registers is broadcast over certain buses on the chip.

In another aspect of the present invention, the Dual Pixel 3DRAM chip features innovative means for reading pixel data, in either single or dual pixel format, from the SRAM pixel buffer.

The above-described and other features of the present invention, including various novel details of operation, construction, assembly and combination of parts, will now be more particularly described with reference to the accompanying drawings. It shall be understood that the particular embodiments of the invention are disclosed herein by way of illustration only and shall not impose limitations on the invention as claimed. The principles and features of this invention may be employed in numerous and varying embodiments without departing from the scope of the present invention.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates in block diagram format a graphics subsystem, also referred to as a video display frame buffer, comprising a set of Dual Pixel 3DRAM chips, a rendering controller, pairs of rendering and address and control busses, and a video output circuit.

FIG. 2 illustrates, in functional block diagram format, one embodiment of the Dual Pixel 3DRAM chip comprising a DRAM array, an SRAM pixel buffer, two pixel arithmetic-logic units (ALUs), and a global bus.

FIG. 2A illustrates a die size floor plan for one embodiment of the Dual Pixel 3DRAM chip comprising the elements depicted in FIG. 2. This embodiment is configured to operate with either the RAMBUS™ or SyncLink input/output interface specification.

FIG. 3 illustrates, in block diagram format, an embodiment of the pixel ALU comprising two sets of processing elements wherein some of the circuitry of some of the processing elements is shared.

FIG. 3A illustrates, in block diagram format, an embodiment of the pixel ALU comprising two separate sets of processing elements.

FIG. 4 illustrates a complete set of processing elements for one embodiment of the pixel ALU and the type of information that is input to, and output from those processing elements. The set of processing elements includes four raster operations (ROP)/blend units (one for processing each of the alpha, red, green and blue components of a pixel), a depth unit, a stencil unit and a window identification (ID) unit.

FIG. 5 illustrates one embodiment of a single ROP/blend unit in block diagram format.

FIG. 6 illustrates one embodiment of a single raster operation (ROP) unit in block diagram format.

FIG. 7 illustrates one embodiment of a single 8-bit blend unit in block diagram format.

FIG. 8 illustrates a set of eight-bit blend unit calculations.

FIG. 9 illustrates a dispersed-dot ordered dither algorithm used in the blend unit.

FIG. 10 illustrates one embodiment of a 10-bit blend unit in block diagram format.

FIG. 11 illustrates a set of 10-bit blend unit calculations.

FIG. 11A illustrates the details of the input multiplexers to the ROP/blend units for one embodiment.

FIG. 12 illustrates one embodiment of a depth compare unit in block diagram format.

FIG. 13 illustrates one embodiment of a stencil compare unit in block diagram format.

FIG. 14 illustrates one embodiment of the stencil data path in block diagram format.

FIG. 15 illustrates one embodiment of a window ID compare unit in block diagram format.

FIG. 16 illustrates one embodiment of the SRAM pixel buffer in block diagram format.

FIG. 17 illustrates a second embodiment of the SRAM pixel buffer in block diagram format.

FIG. 18 illustrates the Dual Pixel 3DRAM chip memory configuration at a high level.

FIG. 19 illustrates a more detailed block diagram of the Dual Pixel 3DRAM chip's memory configuration.

FIG. 19A illustrates one embodiment of the DRAM bank memory configuration in relation to the SRAM pixel buffer, in block diagram format.

FIG. 20 illustrates the address and control ports in block diagram format.

FIG. 21 illustrates the Dual Pixel 3DRAM protocol structure over the address and control (RQ) pins.

FIG. 22 illustrates the bank operation protocol over the address and control pins.

FIG. 23 illustrates the precharge page operation in timing diagram format.

FIG. 24 illustrates the access page operation in timing diagram format.

FIG. 25 illustrates change page operation in timing diagram format.

FIG. 26 illustrates the idle command over the address and control (RQ) pins.

FIG. 27 illustrates the Read Cache Line (RL), Write Cache Line (WL), Masked Write Cache Line (ML) and Change Cache Line (CL) commands over the address and control (RQ) pins.

FIG. 28 illustrates the Flash Masked Write Cache Line command over the address and control (RQ) pins.

FIG. 29 illustrates the Read Cache Line (RL) operation in timing diagram format.

FIG. 30 illustrates the Write Cache Line (WL) operation in timing diagram format.

FIG. 31 illustrates. the Masked Write Cache Line (ML) operation in timing diagram format.

FIG. 32 illustrates the Flash Masked Write Cache Line (FL) operation in timing diagram format.

FIG. 33 illustrates the Change Cache Line (CL) operation in timing diagram format.

FIG. 34 illustrates the idle command over the address and control (RQ) pins.

FIG. 35 illustrates the Read Data (RDAT), Write Data (WDAT) and Broadcast Data (BOAT) commands over the address and control (RQ) pins.

FIG. 36 illustrates the Read Registers (RREG), Write Register (WREG) and Broadcast Register (BREG) commands over the address and control pins.

FIG. 37 illustrates the Read Pixel (RPIX), Single Pixel (SPIX) and Dual Pixel (DPIX) commands over the address and control pins.

FIG. 38 illustrates graphics data transfer across the data (DQ) pins.

FIG. 39 illustrates a 2-cycle RDAT operation followed by 3-cycle RPIX operation in timing diagram format.

FIG. 40 illustrates the timing diagram format for the WDAT, BDAT, WREG, and BREG operations.

FIG. 41 illustrates the timing diagram format for the SPIX and DPIX operations.

FIG. 42 illustrates a 3-cycle DPIX transfer operation in timing diagram format.

FIG. 43 illustrates mixed 2-cycle read and 2-cycle write operations in timing diagram format.

FIG. 44 illustrates mixed 2-cycle read and 3-cycle write operations in timing diagram format.

FIG. 45 illustrates mixed 3-cycle read and 2-cycle write operations in timing diagram format.

FIG. 46 illustrates mixed 3-cycle read and 3-cycle write operations in timing diagram format.

FIG. 47 illustrates four 2-cycle read operations in timing diagram format.

FIG. 48 illustrates eight 2-cycle DPIX operations in timing diagram format.

FIG. 49 continues depicting the eight 2-cycle DPIX operations of FIG. 48.

FIG. 50 illustrates data formats for some of the registers.

FIG. 51 illustrates the data format for the Pixel Config register.

FIG. 52 illustrates the data format for the StencilDepthConfig register.

FIG. 53 illustrates the data format for the ColorOp[0] register.

FIG. 54 illustrates the data format for the ColorOp[1] register.

FIG. 55 illustrates the data format for the ConstantColor register.

FIG. 56 illustrates the data format for the DisplayConfig register.

FIG. 57 illustrates how WREG to ByteMask and ML operations perform fast fill, in timing diagram format.

FIG. 58 illustrates how FL operations perform a really fast fill, in timing diagram format.

FIG. 59 illustrates the input data formatter in block diagram format.

FIG. 60 illustrates the input routing layers of the input data formatter.

FIG. 61 illustrates input data formats.

FIG. 62 illustrates color and depth accumulators in block diagram format.

FIG. 63 illustrates color component formatting for ROP/Blend units.

FIG. 64 illustrates the output data formatter in block diagram format.

FIG. 65 illustrates output data routing: RDAT, RPIX operation.

FIG. 66 illustrates output data routing.

FIG. 67 illustrates output data routing: RPIX operation.

FIG. 68 illustrates output data routing.

FIG. 69 illustrates output data routing.

FIG. 70 illustrates output data routing.

FIG. 71 illustrates output data routing: 96 bits per pixel.

FIG. 72 illustrates output data routing.

FIG. 73 illustrates output data routing.

FIG. 74 illustrates output data routing.

FIG. 75 illustrates output data routing.

FIG. 76 illustrates output data routing.

FIG. 77 illustrates output data routing.

FIG. 78 illustrates output data routing.

FIG. 79 illustrates output data routing.

FIG. 80 illustrates the SRAM-to-pixel ALU formatter in block diagram format.

FIG. 81 illustrates an SRAM pixel buffer organization: 8, 16, 32 bits per pixel.

FIG. 82 illustrates an SRAM pixel buffer organization: 64 bits per pixel.

FIG. 83 illustrates an SRAM pixel buffer organization: 96 bits per pixel.

FIG. 84 illustrates an SRAM pixel buffer organization: 128 bits per pixel.

FIG. 85 illustrates unpack functions.

FIG. 86 illustrates the UnpackDepth function.

FIG. 87 illustrates the UnpackStencil function.

FIG. 88 illustrates the UnpackWid function.

FIG. 89 illustrates pixel ALU-to-SRAM formatter in block diagram format.

FIG. 90 illustrates the PackColor function.

FIG. 91 illustrates the PackDepth function.

FIG. 92 illustrates the PackExtra function.

FIG. 93 illustrates pixel ALU-to-SRAM mask generation.

FIG. 94 illustrates an 8-bit per pixel display mapping.

FIG. 95 illustrates an 8-bit per pixel cache line organization for RPIX, SPIX, DPIX operations.

FIG. 96 illustrates an 8-bit per pixel cache line organization using the RDAT operation.

FIG. 97 illustrates an 8-bit per pixel format.

FIG. 98 is reserved.

FIG. 99 illustrates an 8-bit per pixel display refresh.

FIG. 100 illustrates a 16-bit per pixel display mapping.

FIG. 101 illustrates a 16-bit per pixel cache line organization for RPIX, SPIX, DPIX operations.

FIG. 102 illustrates a 16-bit per pixel cache line organization using the RDAT operation.

FIG. 103 illustrates a 16-bit per pixel format: 4:4:4:4.

FIG. 104 is reserved.

FIG. 105 illustrates a 16-bit per pixel display refresh: 4:4:4:4.

FIG. 106 illustrates a 16-bit per pixel format: 5:6:5.

FIG. 107 is reserved.

FIG. 108 illustrates a 16-bit per pixel display refresh: 5:6:5.

FIG. 109 illustrates a 16-bit per pixel format: 1:5:5:5.

FIG. 110 is reserved.

FIG. 111 illustrates a 16-bit per pixel display refresh: 1:5:5:5.

FIG. 112 illustrates a 32-bit per pixel display mapping.

FIG. 113 illustrates a 32-bit per pixel cache line organization for the RPIX, SPIX, DPIX operations.

FIG. 114 illustrates a 32-bit per pixel cache line organization for using the RDAT operation.

FIG. 115 illustrates a 32-bit per pixel format: 8:8:8:8.

FIG. 116 is reserved.

FIG. 117 illustrates a 32-bit per pixel display refresh: 8:8:8:8.

FIG. 118 illustrates a 32-bit per pixel format: 10:10:10:10.

FIG. 119 is reserved.

FIG. 120 illustrates a 32-bit per pixel display refresh: 2:10:10:10.

FIG. 121 illustrates a 64-bit per pixel display mapping.

FIG. 122 illustrates a 64-bit per pixel cache line organization for the RPIX, SPIX, DPIX operations.

FIG. 123 illustrates a 64-bit per pixel cache line organization using the RDAT operation.

FIG. 124 illustrates a 64-bit per pixel format: 4:8:8:8:8.

FIG. 125 is reserved.

FIG. 126 illustrates a 64-bit per pixel display refresh: 4:8:8:8.:8.

FIG. 127 illustrates a 64-bit per pixel format: 2:10:10:10.

FIG. 128 is reserved.

FIG. 129 illustrates a 64-bit per pixel display refresh: 4:10:10:10.

FIG. 130 illustrates a 64-bit per pixel format: 4:28:2*(4:4:4:4).

FIG. 131 is reserved.

FIG. 132 illustrates a 64-bit per pixel display refresh: 4:28:2*(4:4:4:4).

FIG. 133 illustrates a 64-bit per pixel format: 4:4:24:2*(4:4:4:4).

FIG. 134 is reserved.

FIG. 135 illustrates a 64-bit per pixel display refresh: 4:4:24:2*(4:4:4:4).

FIG. 136 illustrates a 64-bit per pixel format: 4:28:2*(5:6:5).

FIG. 137 is reserved.

FIG. 138 illustrates a 64-bit per pixel display refresh: 4:28:2*(5:6:5).

FIG. 139 illustrates a 64-bit per pixel format: 4:4:24:2*(5:6:5).

FIG. 140 is reserved.

FIG. 141 illustrates a 64-bit per pixel display refresh: 4:4:24:2*(5:6:5).

FIG. 142 illustrates a 64-bit per pixel format: 4:28:2*(1:5:5:5).

FIG. 143 is reserved.

FIG. 144 illustrates a 64-bit per pixel display refresh: 4:28:2*(1:5:5:5).

FIG. 145 illustrates a 64-bit per pixel format: 4:4:24:2*(1:5:5:5).

FIG. 146 is reserved.

FIG. 147 illustrates a 64-bit per pixel display refresh: 4:4:24:2*(1:5:5:5).

FIG. 148 illustrates a 96-bit per pixel display mapping.

FIG. 149 illustrates a 96-bit per pixel cache line organization for the RPIX, SPIX, DPIX operations.

FIG. 150 illustrates a 96-bit per pixel cache line organization using the RDAT operation.

FIG. 151 illustrates a 96-bit per pixel format: 4:28:2*(8:8:8:8).

FIG. 152 is reserved.

FIG. 153 illustrates a 96-bit per pixel display refresh: 4:28:2*(8:8:8:8).

FIG. 154 illustrates a 96-bit per pixel format: 4:28:2*(8:8:8:8).

FIG. 155 is reserved.

FIG. 156 illustrates a 96-bit per pixel display refresh: 4:28:2*(8:8:8:8).

FIG. 157 illustrates a 96-bit per pixel format: 4:4:24:2*(8:8:8:8).

FIG. 158 is reserved.

FIG. 159 illustrates a 96-bit per pixel display refresh: 4:4:24:2*(8:8:8:8).

FIG. 160 illustrates a 96-bit per pixel format: 4:28:2*(2:10:10:10).

FIG. 161 is reserved.

FIG. 162 illustrates a 96-bit per pixel display refresh: 4:28:2*(2:10:10:10).

FIG. 163 illustrates a 96-bit per pixel format: 4:4:24:2*(10:10:10).

FIG. 164 is reserved.

FIG. 165 illustrates a 96-bit per pixel display refresh: 4:4:24:2*(10:10:10).

FIG. 166 illustrates a 96-bit per pixel format: 4:4:24:2*(4:4:4:4).

FIG. 167 is reserved.

FIG. 168 illustrates a 96-bit per pixel display refresh: 4:4:24:4*(4:4:4:4).

FIG. 169 illustrates a 128-bit per pixel display mapping.

FIG. 170 illustrates a 128-bit per pixel cache line organization for the RPIX, SPIX, DPIX operations.

FIG. 171 illustrates a 128-bit per pixel cache line organization using the RDAT operations.

FIG. 172 illustrates a 128-bit per pixel format: 8:32:8:2*(8:8:8:8:8).

FIG. 173 is reserved.

FIG. 174 illustrates a 128-bit per pixel display refresh: 8:32:8:2*(8:8:8:8:8).

FIG. 175 illustrates a 128-bit per pixel format: 8:32:8:2*(8:2:10:10:10).

FIG. 176 is reserved.

FIG. 177 illustrates a 128-bit per pixel display refresh: 8:32:8:2*(8:10:10:10).

FIG. 178 illustrates a 128-bit per pixel format: 8:8:32:2*(10:10:10:10).

FIG. 179 is reserved.

FIG. 180 illustrates a 128-bit per pixel display refresh: 8:8:32:2*(10:10:10:10).

FIG. 181 illustrates two pixels and the locations of each sample within each pixel.

FIG. 182 illustrates the offset between samples within a pixel.

FIG. 183 illustrates a 256-bit per pixel display mapping.

FIG. 184 illustrates a 256-bit per pixel cache line organization for the RPIX, SPIX, DPIX operations.

FIG. 185 illustrates a 256-bit per pixel cache line organization using the RDAT operations.

FIG. 186 illustrates a 256-bit per pixel format: 8:2*(8:8:8:8:8):6*(8:8:8:8:32).

FIG. 187 is reserved.

FIG. 188 illustrates a 256-bit per pixel display refresh: 8:2*(8:8:8:8:8):6*(8:8:8:8:32).

FIG. 189 is reserved.

FIG. 190 is reserved.

FIG. 191 illustrates an SRAM pixel buffer read/write format.

FIG. 192 illustrates a 512-bit per pixel display mapping.

FIG. 193 illustrates a 512-bit per pixel cache line organization for the RPIX, SPIX, DPIX operations.

FIG. 194 illustrates 512-bit per pixel cache line organization using the RDAT operation.

FIG. 195 illustrates a 512-bit per pixel format: 8:2*(8:8:8:8:8):6*(8:8:8:8:32).

FIG. 196 is reserved.

FIG. 197 illustrates a 512-bit per pixel display refresh: 8:2*(8:8:8:8:8):6*(8:8:8:8:32).

FIG. 198 illustrates an SRAM pixel buffer read/write format.

FIG. 199 illustrates a 512-bit per pixel format: 8:2*(8:10:10:10):6*(10:10:10:32).

FIG. 200 is reserved.

FIG. 201 illustrates a 512-bit per pixel display refresh: 8:2*(8:2:10:10:10):6*(2:10:10:10:32).

FIG. 202 illustrates an SRAM pixel buffer read/write format.

FIG. 203 illustrates, in block diagram format, an alternative architecture for the Dual Pixel 3DRAM chip which supports high-speed, simultaneous bidirectional signalling over the I/O bus.

FIG. 204 illustrates, in block diagram format, a second alternative architecture for the Dual Pixel 3DRAM chip which supports high-speed, simultaneous bidirectional signalling over the I/O bus.

DETAILED DESCRIPTION

A detailed description of the present invention follows based on the best modes of carrying out the invention contemplated by the inventors at the present time. References are made herein to the accompanying figures described above, where numbered elements are used consistently throughout the figures. Included throughout this disclosure are descriptions of various functional aspects of the Dual Pixel 3DRAM chip which are expressed in the Verilog Hardware Description Language (VHDL) syntax, which is known by those skilled in the art.

TABLE OF CONTENTS

1.0 ARCHITECTURE

1.1 Pixel ALUs

1.1.1 ROP/Blend Unit

1.1.2 Depth Unit

1.1.3 Stencil Unit

1.1.4 Window ID Unit

1.2 SRAM Pixel Buffer

1.3 Memory Configuration

1.4 Pin Configuration

1.5 Protocol

1.5.1 DRAM Bank Operations

1.5.2 Global Bus Operations

1.5.3 Pixel ALU Operations

1.6 Operation Timing

1.7 Registers

1.7.1 Identification

1.7.2 FeatureEnable

5 1.7.3 PixelConfig

1.7.4 StencilDepthConfig

1.7.5 ColorOp[0]

1.7.6 ColorOp[1]

1.7.7 ConstantColor

1.7.8 Byte Mask[1:0]

1.7.9 Plane Mask[7:0]

1.7.10 ColorWIDLUT[3:0]

1.7.11 OverlayWIDLUT[3:0]

1.7.12 DisplayConfig

1.8 Fast Region Clear

2.0 DATA ROUTING

2.1 Input Data Formatter

2.1.1 Pixel Compression

2.1.2 Input Data Formats

2.1.3 Accumulators

2.1.4 Final Formatting

2.2 Output Data Formatter

2.2.1 RDAT, RPIX (8-, 16-, 32-bit pixel) Operation

2.2.2 RPIX (64-bit pixel) Operation

2.2.3 RPIX (96-bit pixel) Operation

2.2.4 RPIX (128-bit pixel) Operation

2.3 SRAM-to-Pixel ALU Routing

2.3.1 SRAM Organization of 8-, 16-, and 32-bit Pixels

2.3.2 SRAM organization of 64-bit pixels

2.3.3 SRAM organization of 96 bit pixels

2.3.4 SRAM organization of 128 bit pixels

2.3.5 UnpackColors

2.3.6 UnpackDepths

2.3.7 UnpackExtras

2.3.8 UnpackAlpha, UnpackRed, UnpackGreen, UnpackBlue

2.3.9 UnpackDepth

2.3.10 UnpackStencil

2.3.11 UnpackWid

2.3.12 SramToPaluData

2.4 Pixel ALU-to-SRAM Data Routing

2.4.1 PackColor

2.4.2 PackDepth

2.4.3 PackExtra

2.4.4 PaluToSramData

2.5 Pixel ALU-to-SRAM Mask Generation

2.5.1 WriteEnableMask

2.5.2 Pixel Address Mask

2.5.3 MaskDepth

2.5.4 EnableMask

2.5.5 SelectPlaneMask

2.5.6 Pixel ALU-to-SRAM Mask

3.0 PIXEL FORMATS

3.1 8-Bit Pixel Formats

3.2 16-Bit Pixel Formats

3.3 32-Bit Pixel Formats

3.4 64-Bit Pixel Formats

3.5 96-Bit Pixel Formats

3.6 128-Bit Pixel Formats

3.7 Multi-Sample Polygon Anti-Aliasing

3.7.1 Accumulation Buffer

3.7.2 A buffer

3.7.3 Multi-sample

3.7.3.1 Only Color Per Sample

3.7.3.2 Color and Depth Per Sample

3.7.4 Accelerating Color and Depth Per Sample

3.8 256-Bit Pixel Formats (4×Multisample)

3.9 512-Bit Pixel formats (6×Multisample)

4.0 BIDIRECTIONAL I/O

1.0 ARCHITECTURE

FIG. 1 illustrates a graphics subsystem 100 which operates in a computing system. The graphics subsystem 100 is also referred to as a video display frame buffer. The graphics subsystem 100 comprises a rendering controller 102, an interface 104 to the computing system in which the graphics subsystem 100 operates, a video output circuit 106, a video output channel 108 leading from the rendering controller 102 to the video output circuit 106, one or more of the Dual Pixel 3DRAM chip 110 disclosed herein, one or more rendering buses 112 and one or more address and control buses 114. As shown in FIG. 1, the video output circuit 106 is physically separated from the rendering controller 102; however, an alternate embodiment comprises both the rendering controller 102 and the video output circuit 106 within a single chip or device.

The graphics subsystem 100 depicted in FIG. 1 comprises two sets of four Dual Pixel 3DRAM chips 110 a-d and 110 e-h connected to two separate pairs of rendering buses 112 and address and control buses 114. As presently configured, the maximum number of Dual Pixel 3DRAM chips 110 which can be connected to a pair of rendering and address and control buses 112 and 114 is four. However, there is no limit to the number of rendering and control bus pairs between the rendering controller 102 and the Dual Pixel 3DRAM chips 110 used by the graphics subsystem, as represented by the ellipses in FIG. 1. The graphics subsystem 100 is either single or double-buffered, depending on the pixel data being processed, and includes color buffers A and B and a single Z buffer. The graphics subsystem 100 features the capability of supporting several different pixel formats ranging from 8 bits per pixel up to 512 bits per pixel, thereby accommodating numerous frame buffer 100 dimensions.

The rendering controller 102 transfers control information for the Dual Pixel 3DRAM chips 110 a-h over the address and control bus 114. The rendering controller 102 performs pixel data accesses to and from the Dual Pixel 3DRAM chips 110 over the rendering bus 112. The rendering controller 102 transforms sequences of pixel accesses into sequences of rendering operations. The rendering bus 112 supports high-bandwidth communication architectures which have recently emerged within the graphics processing industry, such as RDRAM™ and SLDRAM.

The rendering controller 102 writes pixel data to the Dual Pixel 3DRAM chips 110 a-h over the rendering bus 112, and the Dual Pixel 3DRAM chips 110 a-h transfer updated pixel data back to the rendering controller 102 over the rendering bus 112. The rendering controller 102 transfers frame buffer control signals and commands to the Dual Pixel 3DRAM chips 110 a-h over the separate address and control bus 114. The frame buffer command and control signals regulate internal operations of the Dual Pixel 3DRAM chips 110 a-h.

The Dual Pixel 3DRAM chip 110 supports high bandwidth input/output (I/O) technology to receive control information and to transmit and receive graphics data between the rendering controller 102 and the Dual Pixel 3DRAM chips 110 a-h, while minimizing pin count. For one embodiment, the rendering bus 102 complies with the Rambus Direct RDRAM™ specification for data and control I/O, having an 18-bit bi-directional data bus which transfers pixel data at 1.8 Gigabits per second, and a unidirectional address and control bus which transfers information at 800 Megabits per second. For another embodiment, the rendering bus 102 complies with the open IEEE and JEDEC standard, SLDRAM, formerly known as SyncLink. The following publications provide detailed descriptions of such high-bandwidth I/O architectures, and are incorporated herein by reference as if set forth in their entirety: “SLDRAM Architectural and Functional Overview,” by Peter Gillingham, MOSAID Technologies, Inc., dated Aug. 29, 1997; “Draft Standard For A High-Speed Memory Interface (Synclink),” Draft 0.99 IEEE P1596.7-199X, sponsored by the Microprocessor and Microcomputer Standards Subcommittee of the IEEE Computer Society, dated 1996; “400 Mb/s/pin SLDRAM” “4M×18 SLDRAM pipelined, eight bank, 2.5v operation,” Draft/Advance SLD4M18DR400 4 MEG×18 SLDRAM, issued by the SLDRAM Consortium, dated Sep. 22, 1997. Of course, other embodiments of the Dual Pixel 3DRAM chip 110 are possible to support different I/O architectures.

FIG. 2 illustrates the Dual Pixel 3DRAM chip 110 for one embodiment. The Dual Pixel 3DRAM chip 110 is substantially similar to each of the Dual Pixel 3DRAM chips 110 a-h in FIG. 1. The Dual Pixel 3DRAM chip 110 comprises a DRAM array 116, an SRAM pixel buffer 118, two pixel arithmetic-logic units (ALUs) 120 and 121, and a global bus 122, which in the depicted embodiment comprises separate global write and read buses 123 and 125, respectively. The Dual Pixel 3DRAM chip 110 also comprises a number of data buses and data formatters which route and format graphics data as that data is processed and stored within a Dual Pixel 3DRAM chip 110.

Graphics data both enters and exits the Dual Pixel 3DRAM chip 110 through the rendering bus 112. Graphics data transmitted to the Dual Pixel 3DRAM chip 110 is received by the input/output bus (I/O bus) 124. The input graphics data is demultiplexed by the input data demultiplexer 126, transferred over the input data bus 128 to the input data formatter 130 where the data is formatted, and then the formatted data is transmitted over input data buses 129 and 131 to the pixel ALUs 120 and 121 respectively for processing.

Graphics data transmitted from the Dual Pixel 3DRAM chip 110 to the rendering bus 112 is sent from the SRAM pixel buffer 118 over the SRAM output data bus 132. Prior to being received on the rendering bus 112, the graphics data is formatted by the output data formatter 134, transmitted over the output data bus 135, multiplexed by the output data multiplexer 136 and then transferred off the chip 110 over the I/O bus 124.

Data is routed between the pixel ALUs 120 and 121 and the SRAM pixel buffer 118 through two separate data busses 138 and 139. Graphics data transmitted from the pixel ALUs 120 and 121 to the SRAM pixel buffer 118 is formatted on the way by the pixel ALU-to-SRAM formatter 140 and then routed to the SRAM pixel buffer 118 over data bus 141.

Graphics data transmitted from the SRAM pixel buffer 118 to the pixel ALUs 120 and 121 is routed through the SRAM output data bus 132 to the SRAM-to-pixel ALU formatter 144, and then the formatted data is transmitted to the pixel ALUs 120 and 121 over the SRAM pixel buffer data buses 142 and 143.

Address and control information, which is used to direct operations performed on the chip 110, is transmitted to the Dual Pixel 3DRAM chip 110 over the address and control bus 114. The information is received at the address and control input bus 146, demultiplexed by the address and control demultiplexer 148 and transmitted along the address and control bus 150 to the decoder 151. The decoder 151 receives the demultiplexed address and control information, decodes it, and then transmits the decoded information to the pixel ALUs 120 and 121 and to the SRAM pixel buffer 118 over the pixel ALU operations channel 152, to the SRAM pixel buffer 118, the pipeline registers 127 and 137 and the DRAM array 116 over the global bus operations channel 154, and to the DRAM array 116 over the bank operations channel 156.

FIG. 2A illustrates a die size floor plan for one embodiment of the Dual Pixel 3DRAM chip 110 which is configured to operate with either the RAMBUS™ or SLDRAM (formerly known as SyncLink) input/output interface specifications. Unlike the functional block diagram of FIG. 2, the layout of the Dual Pixel 3DRAM chip 110 in FIG. 2A shows how some of the functional elements shown in FIG. 2 may be physically implemented in a particular embodiment of the Dual Pixel 3DRAM chip 110.

For example, this physical embodiment of the Dual Pixel 3DRAM chip 110 features a DRAM array 116 that is physically separated into four sections 116 a-d located at the four corners of the chip 110. Despite this physical separation, the DRAM array 116 operates as one functional unit as depicted in FIG. 2. The DRAM array 116 of FIG. 2A comprises eight interleaved modular DRAM banks 158 labeled A-H in each of the four sections 116 a-d of FIG. 2A. As with the DRAM array 116, while the eight DRAM banks 158 A-H are physically distributed over the four corners of the chip 110, they operate as eight (rather than thirty-two) functional units.

The overall DRAM capacity of the Dual Pixel 3DRAM chip 110 varies depending on the number of modular DRAM banks 158 used within a specific chip 110 configuration. Each DRAM bank 158 comprises a set of line buffers comprised of sense amplifiers 160. See FIGS. 19 and 19A. (The terms “line buffers” and “sense amplifiers” or “sense amps” are used herein interchangeably, and all refer to element 160.) Each DRAM bank 158 comprises a plurality of DRAM pages 162 comprising several lines 164 of DRAM bits.

One embodiment of the Dual Pixel 3DRAM chip 110 has a DRAM array 116 totaling 40 Megabits, comprised of ten interleaved DRAM banks 158, wherein each bank 158 comprises five hundred and twelve pages 162, and wherein each page 162 comprises eight 1024-bit lines 164. In this embodiment, the structure of each DRAM bank 158 remains constant at 4 Megabits of DRAM (1024 bits/line*8 lines/page*512 pages/bank=4,194,304 bits/bank 4 Megabits/bank). By varying the number of interleaved DRAM banks 158 in a Dual Pixel 3DRAM chip 110, the overall storage capacity of the chip 110 can be adjusted without modifying the chip's internal architecture.

The line buffers 160 are comprised of sense amplifiers and serve as a second level of cache lines when accessing pixel data stored in the DRAM banks 158. (The first level of cache lines are the lines of memory in the SRAM pixel buffer 118.) The line buffers 160 are directly mapped to the DRAM banks 158. In one embodiment, each line buffer 160 maps to one of the pages of the corresponding DRAM bank 158. For one embodiment, a line buffer entry comprises 1 line of 1024 bits.

Referring back to FIG. 2, the pixel buffer 118 is a high speed, multi-ported static RAM (SRAM) component. Data is transferred between the SRAM pixel buffer 118 and the DRAM array 116 over the global bus 122. In the depicted embodiment, the global bus 122 comprises two unidirectional buses, the global write bus 123 and the global read bus 125.

The SRAM pixel buffer 118 reads data which has been formatted by the pixel ALU-to-SRAM formatter 140 over the pixel ALU data bus 138. The SRAM pixel buffer 118 writes data to both the output data formatter 134 and the SRAM-to-pixel ALU formatter 144 over the SRAM output data bus 132. The output data formatter 134 unpacks data fields from the SRAM pixel buffer 118 and repacks some of the fields for display output transmitted over the rendering bus 112. The SRAM-to-pixel ALU formatter 144 also unpacks data fields for use by the pixel ALUs 120 and 121.

In one embodiment, the global write and read buses 123 and 125 each carry 1024 bits between the SRAM pixel buffer 118 and the DRAM array 116, while the pixel ALU data buses 138 and 139, and the SRAM output data bus 132 are each 256 bits wide.

In one embodiment, the SRAM pixel buffer 118 holds eight cache lines, wherein each cache line comprises 1024 bits (1 Kilobit) of memory. The 8-Kilobit SRAM pixel buffer 118 is organized into 8 1-Kilobit cache lines. In another embodiment, the SRAM pixel buffer 118 is organized into sixteen 1-Kilobit cache lines.

The global bus 122 enables communication between the SRAM pixel buffer 118 and the sense amps 160 of the DRAM array 116. In a preferred embodiment, the global bus 122 comprises dual, 1024-bit, 10-nanosecond buses 123 and 125. The global read bus 125 transfers data from the sense amps 160 to the SRAM pixel buffer 118 through a read pipeline register 127, and the global write bus 123 transfers pixel data and mask data from the SRAM pixel buffer 118 to the sense amps 160 through a write data pipeline register 137. This embodiment also employs a write mask pipeline register 145 and a write mask bus 147 to control which bits in the DRAM array 116 are overwritten. In another embodiment, the global bus 122 comprises both a global read bus 125 and a global write bus 123, however no pipeline registers 127, 137 and 145 are employed. In yet another embodiment, the global bus 122 comprises a single, bi-directional bus which is used alternately for both reading to, and writing from the SRAM pixel buffer 118.

Data transfer between the pixel ALUs 120 and 121 and the SRAM pixel buffer 118 differs from that between the SRAM pixel buffer 118 and the DRAM array 116 over the global bus 122. In one embodiment, the pixel ALUs 120 and 121 write data over 256-bit, 5-nanosecond data buses 138 and 139, and the pixel ALUs 120 and 121 read data transmitted over 256-bit, 5-nanosecond buses 142 and 143.

1.1 Pixel ALUs

The pixel ALUs 120 and 121 enable pipelined read-modify-write operations into the SRAM pixel buffer 118. The pipelined read-modify-write operations include Z-buffer compare, RGB alpha raster operations, and blending operations. The multi-ported nature of the SRAM pixel buffer 118 of a preferred embodiment enables parallel transfer of an entire cache line between the line buffers 160 of the DRAM array 116 and the SRAM pixel buffer 118 over the global bus 122.

As depicted in FIGS. 2 and 2A, the Dual Pixel 3DRAM chip 110 features two on-chip Pixel ALUs 120 and 121 to minimize off-chip bandwidth requirements. Updating a 96- or 128-bit pixel requires the transmission of 40 bits of color plus 32 bits of depth information.

The Dual Pixel 3DRAM graphics subsystem 100 employs high bandwidth I/O technology, such as Direct RDRAM™ BY RAMBUS or SLDRAM (formerly known as SyncLink), to transmit data and control information between the rendering controller 102 and the Dual Pixel 3DRAM chip 110, while minimizing pin count on the chip 110. In one embodiment, the Dual Pixel 3DRAM graphics subsystem 100 uses an 18-bit, half-duplex, bi-directional data bus 112 transitioning at 1.8 Gigabits per second (i.e., data transitions on both the rising and falling edges of a 400 MHz clock), and a unidirectional 8-bit control bus 114 from the rendering controller 102 to the Dual Pixel 3DRAM chips 110 a-h, which transitions at 800 Megabits per second. In this embodiment, the Pixel ALUs 120 and 121 operate at either 200 MHz or 133 MHz, depending on the format of the pixels being processed, so the narrow, high frequency data streams received at the pins of the Dual Pixel 3DRAM chip 110 need to be demultiplexed into data streams which are four or six times wider internally. Similarly, data which is processed on the Dual Pixel 3DRAM chip 110 must be multiplexed before being sent over the rendering bus 112 to the rendering controller 102.

Referring to FIG. 2A, the pixel ALUs 120 and 121 are centrally located on the Dual Pixel 3DRAM chip 110. The pixel ALUs 120 and 121 each comprise two complete sets of processing elements, thereby enabling the pixel ALUs 120 and 121 to process two pixels per operation under many circumstances. The format of the pixels being processed determines whether the pixel ALUs 120 and 121 can process two pixels independently, or whether their resources must be combined to process a single pixel at a time. A complete set of processing elements comprises the following: four raster operation (ROP)/blend units 166, a depth unit 168, a stencil unit 170 and a window identification (WID) unit 172.

FIG. 3 shows one embodiment of the pixel ALUs 120 and 121 comprising two sets of processing elements. The first set of processing elements correspond to the first pixel ALU 120, and are labeled with a “0”. The second set of processing elements correspond to the second pixel ALU 121, and are labeled with a “1”. The ROP/blend units 166 are depicted as overlapping to indicate that some of the circuitry used to implement the units 166 is shared.

FIG. 3A shows another embodiment of the pixel ALUs 120 and 121 which also comprise two complete sets of processing elements. The ROP/blend units 166 are broken down into separate ROP units 174 and blend units 176. In this embodiment, there is no shared circuitry between the ROP/blend units 166. This embodiment features four 8-bit blend units 178 and four 10-bit blend units 180. The different capacity blend units are provided to accommodate larger pixel formats. In a preferred embodiment, each of the ROP/blend units is a 10-bit unit.

FIG. 4 depicts a complete set of processing units within either one of the pixel ALUs 120 and 121. Combined on the chip 110, the pixel ALUs 120 and 121 have two complete sets of these units, thereby enabling the Dual Pixel 3DRAM chip 110 to process two pixels per operation under many circumstances. The letter “S” indicates source data transmitted to the pixel ALUs 120 or 121 over the rendering bus 112. The letter “D” indicates destination data transmitted to the Pixel ALUs 120 or 121 from the SRAM pixel buffer 118 over the global bus 122. The letter “R” indicates result data which is transmitted back to the SRAM pixel buffer 118 over the global bus 122. The letters “DT”, “ST” and “WT” are the results of tests performed by the depth unit 168, stencil unit 170, and window ID unit 172 respectively. A complete set of processing units includes four ROP/blend units 166 to provide for processing of the alpha, red, green and blue components of each pixel. In this embodiment of the Dual Pixel 3DRAM chip 110, the source and destination data input streams to the ROP/blend units 166 are each 11 bits wide. The result data stream output from the ROP/blend units 166 is 10 bits wide. For the depth unit 168, the source, destination and result data streams are 32 bits wide. The stencil unit 170 receives a destination stream and outputs a result stream, both of which are 8 bits wide. And the window ID unit 172 receives an 8-bit destination stream of data.

1.1.1 ROP/Blend Unit

FIG. 5 illustrates a single ROP/blend unit 166 in block diagram form for one embodiment. In this embodiment, eight 10-bit ROP/blend units 166 are located within the two pixel ALUs 120 and 121. Each of the eight ROP/blend units 166 is functionally identical, and has four 11-bit data inputs (for source color (Sc), source factor (Sf), destination color (Dc), and destination factor (Df)) and a 10-bit data output for the result. Each ROP/blend unit 166 performs one of the following six operations: (1) ROP(Sc, Pc, Dc); (2) min(Sc, Dc); (3) max(Sc, Dc); (4) Sc*Sf+Dc*Df; (5) Sc*Sf−Dc*Df; or (6) Dc*Df−Sc*Sf.

When performing ROP, min, max or 8-bit blend operations, all eight ROP/blend units 166 can work in parallel. When performing 10-bit blend operations, pairs of blend units 176 need to be combined together to perform the required processing. Thus when 10-bit blend operations are performed by the Dual Pixel 3DRAM Chip 110, only one pixel can be processed at a time. Another embodiment has eight 10-bit ROP/blend units 166 and can process two pixels at a time in all cases.

The source and destination blending factors, “Sf” and “Df,” are derived from the source, destination, and pattern colors as illustrated in Table 1, below:

TABLE 1 Blend Factors Factor Parameter Alpha Red Green Blue Sf Df GL_ZERO 0 x x GL_ONE 1 x x GL_SRC_COLOR Sα SR SG SB x GL_ONE_MINUS_SRC_COLOR 1-Sα 1-Sr 1-Sg 1-Sb x GL_DST_COLOR Dα Dr Dg Db x GL_ONE_MINUS_DST_COLOR 1-Dα 1-Dr 1-Dg 1-Db x GL_SRC_ALPHA Sα x x GL_ONE_MINUS_SRC_ALPHA 1-Sα x x GL_DST_ALPHA Dα x x GL_ONE_MINUS_DST_ALPHA 1-Dα x x GL_SRC_ALPHA_SATURATE 1 min (Sα, 1-Dα) x CL_CONSTANT_COLOR_EXT Pα Pr Pg Pb x x CL_ONE_MINUS_CONSTANT_COLOR_EXT 1-Pα 1-Pr 1-Pg 1-Pb x x CL_CONSTANT_ALPHA_EXT Pα x x CL_ONE_MINUS_CONSTANT_ALPHA_EXT 1-Pα x x

Referring now to FIG. 6, the raster operation (ROP) portion 174 of the ROP/Blend unit 166 performs 1 of 256 Boolean operations on source Sc, destination Dc, and pattern Pc inputs. A ROP register 182, which is set by information transmitted over the address and control bus 114, determines which of the 256 boolean operations is performed. In the case where three inputs are needed, one input is written to a pattern register 184 before the raster operation takes place. A one-bit slice of the ROP portion 174 can be implemented with the following Boolean equation:

Result=(Op[0]&˜Dc&˜Sc&˜Pc)|(Op[1]&Dc&˜Sc&˜Pc)|(Op[2]&˜Dc&˜Sc&˜Pc)|(Op[3]&Dc&˜Sc&˜Pc)|(Op[4]&˜Dc&˜Sc&˜Pc)|(Op[5]&Dc&˜Sc&˜Pc)|(Op[6]&˜Dc&˜Sc&˜Pc)|(Op[7]&Dc&˜Sc&˜Pc);

Referring to FIGS. 7-11B, the blend portion 176 of the ROP/blend unit 166 comprises the following processing circuitry or elements: one dither calculation device 186, two multipliers 188 and 190, an adder 192, one truncate device 194, and one clamp device 196. An 8-bit blend unit 178 is shown in FIG. 7. Eight of these units are required in order to be able to blend two pixels (or samples when performing anti-aliasing) per operation.

The source and destination color values S color and D color represent values within the range [0.0, 1.0], regardless of how many bits are used to represent them. Each bit encoding represents a range of values. For example, an 8-bit input of 14 represents the range [14/256, 15/256). When performing calculations, a single value is chosen to represent the entire range. If the value 14/256 were chosen to represent the range [14/256, 15/256), then the calculation error would be biased toward the lower end of the range. If the mid-point of the range were chosen, 14.5/256, then the calculation error would be evenly biased with respect to the range, and the final result would be more accurate. This can be accomplished by concatenating a 1 to the least significant bit of the inputs to the multipliers. Hence the 8-bit blend units 178 require 9-bit-by-9-bit multipliers 188 and 190.

FIG. 8 shows the format of intermediate values during the blending operation calculations. A dither-offset value is calculated based on the two least significant bits of the pixel's X and Y addresses. The two products and dither offset are added together. At most, one of the product values may be negated. The sum is then truncated and clamped to produce the result.

In one embodiment, a dispersed-dot ordered dither algorithm with a 4-by-4 Bayer dither matrix is employed, as reflected in FIG. 9 and in “Computer Graphics Principles and Practice,” Foley, vanDam, Feiner, and Hughes, second edition pp. 570-1, which text is incorporated herein by reference as if set forth in its entirety. The dither value, in the range (−0.5, 0.5), offsets the result value prior to truncation. Of course, other dither algorithms well known in the art may also be used.

FIG. 10 depicts a 10-bit blend unit 180. Four of these units are required to be able to blend one pixel per operation. In one embodiment, the 10-bit blend unit 180 is implemented in such a manner so as to reuse as much logic as possible between each 10-bit blend unit 180 and each pair of 8-bit blend units 178. The 10-bit blend unit 180 requires two 11-bit-by-11-bit multipliers 188 and 190 for the same reason as discussed above concerning the 8-bit blend unit 178.

This embodiment also features two input multiplexers 206 and 208 through which source factor, Sf, and destination factor, Df, data is input into the ROP/blend unit 166. FIG. 11A provides a diagram of the details of input multiplexers 206 and 208.

1.1.2 Depth Unit

FIG. 12 presents a block diagram of the depth unit 168. There are two depth units 168 in the pixel ALUs 120 and 121. The two depth units 168 compare 32 bits of source data with 32 bits of destination data. Control information is provided to a 16-bit mask register 210 which is then bitwise anded with source and destination data prior to the compare operation. The unsigned integer compare operation is specified by a 3-bit register field in a function/operation register 212 which specifies one of the following eight tests: (1) fail, (2) src<dest, (3) src==dest, (4) src<=dest, (5) src>dest, (6) src!=dest, (7) src>=dest, (8) pass. Positive IEEE single precision floating point numbers will compare correctly if the sign bit is masked to zero.

1.1.3 Stencil Unit

FIGS. 13 and 14 present block diagrams of the stencil unit 170. There are two stencil units 170 within the pixel ALUs 120 and 121. Each of the two 8-bit stencil units 170 has an 8-bit data input for destination stencil, a 1-bit depth test input, an 8-bit data output and a 1-bit compare output. The unsigned integer compare operation is specified by a 3-bit register field in a function/operation register 214 and specifies one of the following eight tests: (1) fail, (2) ref<dest, (3) ref==dest, (4) ref<=dest, (5) ref>dest, (6) ref!=dest, (7) ref>=dest, (8) pass.

Referring to FIG. 14, one of three stencil operation codes is selected, depending upon the statuses of the depth and stencil tests. The operation code determines which stencil operation is performed. The possible stencil operations are: dest, 0, ref, wrap(dest+1), wrap(dest−1), saturate(dest+1), saturate(dest−1), dest.

1.1.4 Window ID Unit

FIG. 15 provides a block diagram of the window identification (ID) unit 172. There are two window ID units 172 within the pixel ALUs 120 and 121. Each of the two 8-bit window ID compare units 172 has an 8-bit data input for destination WID and a 1-bit compare result output. The window ID unit's 172 behavior is controlled by an 8-bit field in a mask register 216, an 8-bit field in a reference register 218, and a 3-bit field in a function register 220. The 2-bit function register field specifies one of the following eight tests: (1) fail, (2) ref<dest, (3) ref==dest, (4) ref<=dest, (5) ref>dest, (6) ref!=dest, (7) ref>=dest, (8) pass. The Window ID units 172 and the stencil test units 170 are functionally identical.

The test results from the window ID unit 172, the stencil unit 170 and the depth unit 168 are used to control operations in the Dual Pixel 3DRAM chip 110. Table 2 lists the actions which are taken or not taken based on the results of the three units.

TABLE 2 Pixel Texts WID Stencil Depth Test Test Test Action Fail — — Don't write pixel Pass Fail — Write only stencil bits Pass Pass Fail Write only stencil bits Pass Pass Pass Write stencil, depth, and color bits

1.2 SRAM Pixel Buffer

FIGS. 16 and 17 depict the SRAM pixel buffer 118. For one embodiment, the SRAM pixel buffer 118 is implemented with an 8-word×1024-bit, multi-ported SRAM. The global bus 122 comprises a 1024-bit, 10-nanosecond read bus 125 which transfers data from the sense amps 160 of the DRAM array 116 to the SRAM pixel buffer 118 through a 1024-bit pipeline register 127. The global bus 122 also comprises a 1024-bit, 10-nanosecond write bus 123 which transfers data from the SRAM pixel buffer 118 to the sense amps 160 through a 1024-bit pipeline register 137. In this embodiment, the global bus 122 also transfers 1024 bits of mask data from the SRAM pixel buffer 118 to the sense amps 160 through a write mask pipeline register 145 and a write mask bus 147.

Each cache line in the SRAM pixel buffer 118 has associated with it a tag 230 comprising 5 bits of bank address and 3 bits of column address. The tags 230 are used to keep track of the location from where the data which is presently stored in the SRAM pixel buffer 118 came.

A global bus read operation is initiated by either the Read Cache Line (RL) or Change Cache Line (CL) operation. In the first 10 nanosecond cycle, 1024 bits of data are copied from the specified DRAM bank 158 and column to the read data pipeline register 127. In the second 10 nanosecond cycle, the 1024 bits of data are copied from the read data pipeline register 127 to the specified line in the SRAM pixel buffer 118, and the bank and column addresses from which that data was originally retrieved are written to the cache line's tag 230.

A global bus write operation is initiated by the Write Cache Line (WL), Masked Write Cache Line (ML) or Change Cache Line (CL) operation. In the first 10 nanosecond cycle, 1024 bits of data are copied from the specified line in the SRAM pixel buffer 118 to the write data pipeline register 137, and 1024 bits of mask data are generated from plane mask and byte mask registers and copied to the write mask pipeline register 147. If the operation is a WL or ML, the operation's bank and column addresses are copied to the bank and column pipeline registers 231 and 232. If the operation is a CL, the bank and column pipeline registers 231 and 232 copied from the specified cache line's bank and column tags 230. In the second 10 nanosecond cycle, the contents of the write data pipeline register 137 are copied to the DRAM bank and column specified by the bank and column pipeline registers 231 and 232 under control of the write mask pipeline register 145.

A sample function for the above-described procedure is provided below:

function Mask[1023:0]

input[511:0]PlaneMask;

input[127:0]Bytemask;

input IsMasked;

integer I;

begin

for (i=0; i<1024; i=i=1) begin

Mask[I]=(!IsMasked)|(PlaneMask[i%512] & ByteMask[i/8]);

end;

end;

endfunction

The pixel ALU read operation is initiated by the Read Data (RDAT), Read Pixel (RPIX), Single Pixel (SPIX) and Dual Pixel (DPIX) operations. The Pixel ALU data bus 141 is 256-bits wide and operates at a rate of 5-nanoseconds, and the SRAM pixel buffer data bus 142 is also 256-bits wide and operates at a rate of 5-nanoseconds. The SRAM pixel buffer 118 has an additional line containing a 512-bit plane mask 222. During a ML operation, the 512-bit plane mask and 128-bit byte mask registers are combined to generate the contents of a 1024-bit write mask 145 which is latched at the same time as the write data.

Read and write ports are addressed on 128-bit boundaries. The 256-bit data channels 138 and 142 operate at 200 MHz, while the 1024-bit global bus channels 122 operate at 100 MHz. In a preferred embodiment, the SRAM pixel buffer 118 holds 8 cache lines 224. The 256-bit data channels 138 and 142 must be able to access 256 consecutive bits of a cache line 224, starting at any 128-bit boundary. As depicted in FIG. 2A, this requirement is met in one embodiment by partitioning the SRAM pixel buffer 118 into four physical arrays 118 a-d with 64-bit read and write data channels 138 a-d and 132 a-d. In this embodiment, separate read and write addresses are applied to each of the four separate arrays. In another embodiment, the global bus 122 allows for concurrent read and write operations between the SRAM pixel buffer 118 and the sense amps 160, thereby eliminating the need for dirty tags.

In another embodiment, dirty tags 226 are used within the SRAM pixel buffer to indicate which bits of the SRAM pixel buffer cache lines 224 have been updated by the pixel ALUs 120 and 121 since the data was transferred from the DRAM array 116. Referring to FIG. 17, the dirty tag SRAM 226 is implemented with a 16-word×256-bit dual-ported SRAM. The global bus 122 connects to 256-bit, 10-nanosecond read/write ports. The pixel ALUs 120 and 121 write mask data to a 256-bit, 5-nanosecond write port, with 256 per bit write enables (WE).

During a Read Cache Line (RL) operation, a line of data is written into a data portion of the SRAM pixel buffer 118, and the corresponding line in the tag SRAM 226 is cleared.

1.3 Memory Configuration

FIGS. 18, 19 and 19A depict the structure of the DRAM array 116 for one embodiment. The DRAM array 116 is comprised of modular DRAM banks 158. The basic unit of memory is a line 164 which holds 1024 bits. A page 162 comprises 8 lines 164, or 8 Kilobits. In one embodiment, a DRAM bank 158 comprises 512 pages 162, or 4 Megabits of memory. In another embodiment, a DRAM bank 158 comprises 1024 pages 162, or 8 Megabits of memory. In the embodiment wherein the DRAM bank 158 holds 8 Megabits of memory, 5, 6, 8, 10, 12, 16 and 20 independent DRAM banks 158 are required to support 40-Megabit, 48-Megabit, 64-Megabit, 80-Megabit, 96-Megabit, 128-Megabit and 160-Megabit DRAM arrays 116, respectively.

The following table is based on the DRAM array 116 configurations for both the 64/72-Megabit Direct RDRAM™ and 4-Megabit×18 SLDRAM data sheets. Direct RDRAM™ has a 128/144-bit interface between the DRAM core and I/O section. SLDRAM has a 64/72-bit interface. Dual Pixel 3DRAM 110 has a 1024-bit interface.

TABLE 3 DRAM Configurations (Per Device) 32 40 64 80 128 160 Mbit Mbit Mbit Mbit Mbit Mbit Banks per DRAM   8  10  16  20  32  40 Pages per Bank  512  512  512  512  512  512 Lines per Page   8   8   8   8   8   8 Bits per Line 1024 1024 1024 1024 1024 1024

TABLE 4 Possible DRAM Bank and Page Organizations Bits/ Sense Level Device Banks/Device Pages/Device Bits/Page Amps 2Cache  40 10 doubled  512  8K  44K  40K Mbit 5 1025  8K  60K  40K 10  512  8K  80K  80K 5  512 16K  80K  80K  80 20 doubled  512  8K  84K  80K Mbit 5 1024 16K 100K  80K 10 1024  8K 120K  80K 20  512  8K 160K 160K 10  512 16K 160K 160K 5  512 32K 160K 160K 4  512 40K 160K 160K 160 40 doubled  512  8K 164K 160K Mbit 5 1024 32K 180K 160K 10 1024 16K 200K 160K 20 1024  8K 240K 160K 40  512  8K 320K 320K 20  512 16K 320K 320K 10  512 32K 320K 320K 8  512 40K 320K 320K 5  512 64K 320K 320K 4  512 80K 320K 320K

1.4 Pin Configuration

The Dual Pixel 3DRAM chip 110 is pin compatible with either Direct RDRAM™ or SLDRAM. The following table shows a Direct RDRAM™ compatible pin configuration.

TABLE 5 Dual Pixel 3DRAM pins Signal I/O Type Description  RQ[7:0] I RSL Control and address info DQA[8:0] I/O RSL Data byte A DQB[8:0] I/O RSL Data byte B CFM I RSL Clock from master + CFMN I RSL Clock from master − CTM I RSL Clock to master + CTMN I RSL Clock to master − V_(REF) Logic threshold reference voltage for RSL signals V_(TERM) Termination voltage for RSL load resistors SIO[1:0] I/O CMOS Serial input/output CMD I CMOS Serial command input SCK I CMOS Serial clock input V_(DD) Supply voltage for RDRAM core and interface GND Ground reference for RDRAM core and interface

1.5 Protocol

Direct RDRAM™ provides 8 pins and SLDRAM provides 10 pins for transmitting control and address information. The Dual Pixel 3DRAM protocol requires 8 pins so it can be used with either interface technology. Each port controls one to four Dual Pixel 3DRAM chips 110.

Referring now to FIGS. 20 and 21, 800 Megabytes per second of control and address information are divided into three channels. The pixel ALU operations channel 152 handles 400 Megabytes per second and controls the pixel ALUs 120 and 121, the SRAM pixel buffer 118 and interface with the rendering bus 112. The bank operations channel 156 handles 200 Megabytes per second and controls the accessing and precharging of DRAM banks 158 and pages 162. The global bus operations channel 154 handles 200 Megabytes per second and controls the reading and writing of SRAM pixel buffer 118 cache lines 224 over the global bus 122. Each channel 152, 154 and 156 performs its own framing of operations and includes its own device identification information, so the three channels can operate on different Dual Pixel 3DRAM chips 110 at the same time.

1.5.1 DRAM Bank Operations

DRAM bank operations are transmitted over a dedicated, 2-pin control channel 156 with 200 Megabytes per second of bandwidth. DRAM bank operations can commence transmission at the falling edge of any clock. The bank operations listed in Table 6 below are defined in one embodiment:

TABLE 6 Bank Operations 0[1:0] Mnemonic Operation Cycles 00 IDLE Idle 1 01 PP Precharge page 3 10 AP Access Page 5 11 CP Change Page 5

Referring to FIG. 22, Bits D_(1:0) select one of the four possible Dual Pixel 3DRAM devices 110 connected over a common bus 114. Bits B_(4:0) select one of 32 possible DRAM banks 158 within a single Dual Pixel 3DRAM device 110. Bits P_(9:0) select one of 1024 possible pages 162 within a DRAM bank 158.

The IDLE operation does nothing for one cycle.

Referring to FIGS. 22 and 23, the Precharge Page (PP) operation precharges bank B_(4:0) of device D_(1:0) and takes three cycles to transmit and eight cycles to execute.

Referring to FIGS. 22 and 24, the Access Page (AP) operation accesses page P_(9:0) of Bank B_(4:0) of device D_(1:0) and takes 5 cycles to transmit and 8 cycles to execute. The DRAM bank 158 must have been previously precharged.

Referring to FIGS. 22 and 25, the Change Page (CP) operation combines a Precharge Page operation followed by an Access Page operation to the same bank of the same device.

1.5.2 Global Bus Operations

Global Bus operation transfers are managed by a dedicated 2-pin control channel 154 with 200 Megabytes per second of bandwidth. Global Bus operations can commence transmission at the falling edge of any clock. Since global bus transfers require 4 clocks, a command transmission can also take 4 clocks.

Referring now to FIGS. 26-30, bits D_(1:0) select one of four possible Dual Pixel 3DRAM devices 110 hanging off a common bus 114. Bits B_(4:0) select one of 32 possible DRAM banks 158 within a device 110. Bits C_(2:0) select one of 8 possible cache line buffers 160 within the selected DRAM bank 158. Bits L_(3:0) select one of 16 possible cache lines 224 in the SRAM pixel buffer 118.

Table 7 below lists the Global Bus operations which are defined in one embodiment:

TABLE 7 Global Bus Operations 0[2:0] Mnemonic Operation Cycles 000 IDLE Idle 1 001 — Reserved — 010 RL Read Cache Line 4 011 — Reserved — 100 WL Write Cache Line 4 101 ML Masked Write Cache Line 4 110 FL Flash Masked Write Cache Line 4 111 CL Change Cache Line 4

Referring to FIG. 26, the IDLE operation does nothing for one cycle.

The Read Cache Line (RL), Write Cache Line (WL), Mask Cache Line (ML) and Change Cache Line (CL) commands all have the same format on the control (RQ) pins as depicted in FIG. 27. The Fast Fill Cache Line (FL) command is depicted in FIG. 28.

Referring to FIG. 29, the Read Cache Line (RL) operation applies only to device D_(1:0) and copies cache line buffer 160 C_(2:0) from DRAM bank 158 B_(4:0) into the pipeline register 127. It then write pipeline register value into line L_(3:0) of the SRAM pixel buffer 118. This operation takes 4 cycles to transmit and 4 cycles to perform each data transfer. Each line in the SRAM pixel buffer 118 has a bank and column tag 230 indicating where the line came from. The bank and column tags 230 are set by the RL operation during the write transfer to the SRAM pixel buffer 118.

Referring to FIG. 30, the Write Cache Line (WL) operation applies only to device D_(1:0) and copies cache line 224 L_(3:0) from the SRAM pixel buffer 118 to the pipeline register 137. The pipeline register data is then copied to column C_(2:0) of DRAM bank 158 B_(3:0). The bank and column tags 230 are ignored. This operation takes 4 cycles to transmit and 4 cycles to perform each data transfer.

Referring to FIG. 31, the Masked Write Cache Line (ML) operation applies only to device D_(1:0) and copies cache line L_(2:0) from the SRAM pixel buffer 118 to the pipeline register. The pipeline register data is then copied to column C_(2:0) of bank B_(3:0). The bank and column tags are ignored. This operation takes four cycles to transmit and four cycles to perform each data transfer. The PlaneMask and ByteMask registers are both expanded to 1024 bits and then used as per bit write enables when the cache line is written to the Sense Amps.

Referring to FIG. 32, the Flash Masked Write Cache Line (FL) operation is similar to ML except that the pipeline data and mask are written to four columns instead of just one. It applies only to device D_(1:0) and copies cache line L_(2:0) from the SRAM to the pipeline register. The pipeline register data is then copied to either columns 0-3 or 4-7 of bank B_(3:0). The bank and column tags are ignored. This operation takes four cycles to transmit and four cycles to perform each data transfer. The PlaneMask and ByteMask registers are both expanded to 1024 bits and then used as per bit write enables when the cache line is written to the Sense Amps.

Referring to FIG. 33, the Change Cache Line (CL) operation applies only to device D_(1:0) and performs Read Cache Line and Write Cache Line operations simultaneously. The bank and column fields from the operation control the RL command. The bank and column tags 230 from the cache line 224 control the WL command. This operation takes 4 cycles to transmit and 4 cycles to perform each data transfer.

1.5.3 Pixel ALU Operations

The Pixel ALU operations are transmitted over a dedicated 4-pin control channel 152 with 400 Megabytes per second of bandwidth. Pixel ALU operations can commence transmission at the falling edge of any clock. Operations other than IDLE require 2 cycles to transmit over the control pins. Each Pixel ALU operation controls the transfer of either 72 bits of data in 2 cycles or 108 bits of data in 3 cycles over the data pins (DQA[_(8:0)] and DQB[_(8:0)]). The 2/3 bit of every operation indicates how many cycles are needed. Pixel ALU operations that require 3 cycles for data transfer should be followed by an IDLE cycle. The operations listed below in Table 8 are defined Pixel ALU operations for one embodiment:

TABLE 8 Pixel ALU Operation O [3:0] Mnemonic Operation Cycles 0000 IDLE Idle 1 0001 — Reserved 0010 — Reserved 2 0011 — Reserved 0100 RREG Read Register 2 0101 — Reserved 0110 WREG Write Register 2 0111 BREG Broadcast Register 2 1000 RDAT Read Data 2 1001 — Reserved 1010 WDAT Write Data 2 1011 BDAT Broadcast Data 2 1100 RPIX Read Pixel 2 or 3 1101 — Reserved 1110 SPIX Single Pixel 2 1111 DPIX Dual Pixel 2 or 3

Bits O_(3:0) specify the operation type. Bits D_(1:0) select one of four Dual Pixel 3DRAM devices 110 hanging off a common bus 114. In broadcast operations, D_(1:0) are ignored. Bits L_(2:0) select one of 8 cache line 224 in the SRAM pixel buffer 118. Bits P_(3:0) select one of 16 pixels in a cache line 224. The interpretation of P_(3:0) varies depending upon the operation type and current pixel depth. Bits R_(7:0) are used by register operations to specify the register address.

Referring to FIG. 34, IDLE does nothing for one cycle.

Referring to FIG. 35, the Read Data (RDAT) operation reads 64 bits of raw data from the specified pixel of the specified line 224 of the specified device's 110 SRAM pixel buffer 118. This operation is not affected by any register settings.

The Write Data (WDAT) operation writes 64 bits of raw data to the specified pixel of the specified line 224 of the specified device's 110 SRAM pixel buffer 118. Per byte write enables are transmitted over pins DQA8 and DQB8. This operation is not affected by any register settings.

The Broadcast Data (BDAT) operation broadcasts 64 bits of raw data to the specified pixel of the specified line 224 of all Dual Pixel 3DRAM devices' 110 SRAM pixel buffers 118. Per byte write enables are transmitted over pins DQA₈ and DQB₈. This operation is not affected by any register settings.

Referring to FIG. 36, the Read Register (RREG) operation reads a register value from the specified device 110.

The Write Register (WREG) operation writes a register value to the specified device 110. Per byte write enables are transmitted over pins DQA₈ and DQB₈.

The Broadcast Register (BREG) operation broadcasts a register value to all devices 110. Per byte write enables are transmitted over pins DQA₈ and DQB₈.

Referring to FIG. 37, the Read Pixel (RPIX) operation reads packed pixels for display refresh.

The Single Pixel (SPIX) operation merges a single source pixel with pixel data already in the SRAM pixel buffer 118.

The Dual Pixel (DPIX) operation merges two, side-by-side source pixels with pixel data already in the SRAM pixel buffer 118.

One embodiment of the Dual Pixel 3DRAM chip 110 uses dirty tags. In this embodiment, the Write Tag (WTAG) operation expands 64 bits of byte mask data to a 128-bit mask that is written to the lower or upper half of the specified line 224 of the specified device's dirty tags 226. The dirty tags 226 for a line can be written in two cycles matching the amount of time it takes to write the line over the global bus to the DRAM array.

FIG. 38 depicts one embodiment in which the Dual Pixel 3DRAM device 110 can transfer 36 bits of data every cycle. Two or three clocks of data are associated with each Pixel ALU Operation.

Referring to FIG. 39, the Read Data (RDAT) and Read Pixel (RPIX) operations employ some of the SRAM pixel buffer 118 and Pixel ALUs 120 and 121. The Pixel ALUs 120 and 121 are unused, and nothing is written to the SRAM pixel buffer 118. FIG. 39 illustrates a 2-cycle RDAT followed by a 3-cycle RPIX.

As illustrated in FIG. 40, the Write Data (WDAT), Broadcast Data (BDAT), Write Register (WREG) and Broadcast Register (BREG) operations receive data on the DQ pins, send the data through the Pixel ALUs 120 and 121, and latch the data at the appropriate stage. None of the above operations benefit from 3-cycle transfers.

The Single Pixel (SPIX) and Dual Pixel (DPIX) operations fully utilize the SRAM pixel buffer 118 and the Pixel ALUs 120 and 121. These two operations read and unpack data from the SRAM pixel buffer 118, receive data from the DQ pins, combine both sets of data in the Pixel ALUs 120 and 121, and write the results back to the SRAM pixel buffer 118. FIG. 41 shows a 2-cycle SPIX transfer, and FIG. 42 shows a 3-cycle DPIX transfer.

1.6 Operation Timing

Examples of timing for many of the operations described above are illustrated in FIGS. 43-49:

FIG. 43 shows the intermixing of 2-cycle read and 2-cycle write operations.

FIG. 44 shows the intermixing of 2-cycle read and 3-cycle write operations.

FIG. 45 shows the intermixing of 3-cycle read and 2-cycle write operations.

FIG. 46 shows the intermixing of 3-cycle read and 3-cycle write operations.

FIG. 47 shows all of the operations needed to perform four 2-cycle read operations.

FIGS. 48 and 49 show all of the operations needed to perform eight 2-cycle Dual Pixel (DPIX) operations. The DPIX operations 4-7 are to a different bank 158 than that of DPIX operations 0-3.

1.7 Registers

The RREG, WREG, and BREG operations allow for a 128-word by 64-bit register address space. Efficiency dictates taking advantage of the register width to minimize the number of cycles needed to reprogram the Pixel ALUs 120 and 121. Table 9 below identifies the registers employed in the Dual Pixel 3DRAM chip 110FIG. 50 illustrates the data. formats for some of the registers listed in Table 9. Grey portions represent reserved fields for these registers.

TABLE 9 Register Map R_(7:0) Name Mnemonic Reset Value Act 0 Identification ID N/A R 1 Feature Enable FE 0x0000 0000 0000 0000 R/W 2 Pixei Config PC 0x0000 0000 0000 0000 R/W 3 Stencil Depth Config SDC 0x0000 0000 0000 0000 R/W 5-4 ColorOp [1:0] CO 0x0000 0000 0000 0000 R/W 6 Constant Color CC 0x0000 0000 0000 0000 R/W 13-7  Reserved — — — 15-14 Byte Mask [1:0] BM 0xFFFF FFFF FFFF FFFF R/W 23-16 Plane Mask [7:0] PM 0xFFF FFFF FFFF FFFF R/W 63-23 Reserved — — — 67-64 ColorWIDLUT [3:0] CWL 0x0000 0000 0000 0000 R/W 71-68 OverlayWIDLUT [3:0] OWL 0x0000 0000 0000 0000 R/W 72  Display Config DC 0x0000 0000 0000 0000 R/W 127-73  Reserved

1.7.1 Identification

This read-only register identifies the manufacturer, part number, version, and mask stepping for the chip.

1.7.2 FeatureEnable

This register enables or disables new functionality in future versions of Dual Pixel 3DRAM. In the initial version of Dual Pixel 3DRAM, it resets to 0x0000_(—)0000_(—)0000_(—)0000 and should set to any other value.

1.7.3 PixelConfig

FIG. 51 illustrates the data field format for the PixelConfig register. This register determines the pixel depth and detailed format of the pixel. Reserved fields, shown in gray, must be set to 0 to ensure future compatibility. Table 10 describes the register's data fields.

TABLE 10 PixelConfig Register Fields Field Width Description PixelSize 3 bit Pixel size for SRAM->PALU and PALU->SRAM ColorMode 4 bit Determines how color data is stored BufferSelect 2 bit Selects A/B color data InputMode 4 bit Controls DQ->PALU routing DestinationFactor 4 bit Destination blend factor SourceFactor 4 bit Source blend factor WIDMask 8 bit WID mask value WIDRef 8 bit WID reference value WIDFunc 3 bit WID compare operation

The PixelSize field is used by the Pixel ALU-to-SRAM format 140 and the SRAM-to-Pixel ALU formatter 144 to select the pixel size during SPIX and DPIX operations.

TABLE 11 Pixel Size PS[2:0] Pixel Size 0  8 bit, 16 bit, 32 bit 1  64 bit 2 128 bit 3 256 bit 4 512 bit

The ColorMode field specifies the color data format for formatters 140 and 144. Table 12 describes the colormode formats.

TABLE 12 ColorMode Field Color Format Encoding Alpha Red Green Blue 0 8 8 8 8 1 8 0 0 0 2 2 10  10  10  3 10  10  10  10  4 4 4 4 4 5 8 8 0 0 6 0 5 6 5 7 1 5 5 5

The BufferSelect field selects a color buffer for formatters 140 and 144 which format data between the Pixel ALUs 120 and 121 and the SRAM Pixel Buffer 118. BufferSelect[0] chooses between the lower and upper 16 bits of color in a 32-bit word. If the color is 32 or 40 bits, BufferSelect[0] has no effect. BufferSelect[1] chooses between the lower and upper 32 or 40 bits of color data when 64 or 80 bits of color are in a pixel. BufferSelect[1] has no effect if the PixelSize is 64 bits.

InputMode controls the input data formatter 130. The source and destination factor fields are encoded as described in Table 13.

TABLE 13 Blend operation field Factor Encoding Alpha Red Green Blue OpenGL 0 0 GL_ZERO 1 1 GL_ONE 2 1 min (Sα, 1-Dα) GL_SRC_ALPHA_SATURATE 4 Sα Sr Sg Sb GL_SRC_COLOR 5 1-Sα 1-Sr 1-Sg 1-Sb GL_ONE_MINUS_SRC_COLOR 6 Sα GL_SRC_ALPHA 7 1-Sα CL_ONE_MINUS_SRC_ALPHA 8 Dα Dr Dg Db GL_DST_COLOR 9 1-Dα 1-Dr 1-Dg 1-Db GL_ONE_MINUS_DST_COLOR 10  Dα GL_DST_ALPHA 11  1-Dα GL_ONE_MINUS_DST_ALPHA 12  Cα Cr Cg Cb GL_CONSTANT_COLOR 13  1-Cα 1-Cr 1-Cg 1-Cb GL_ONE_MINUS_CONSTANT_COLOR 14  Cα GL_CONSTANT_ALPHA 15  1-Cα GL_ONE NINUS_CONSTANT_ALPHA

The WIDFunc, DepthFunc, and StencilFunc fields are encoded as described in table 14.

TABLE 14 WIDFunc, DepthFunc, and StencilFunc Field DepthFunc Condition OpenGL 0 Pass GL_ALWAYS 1 Source > Destination GL_GREATER 2 Source == Destination GL_EQUAL 3 Source >= Destination GL_GEQUAL 4 Fail GL_NEVER 5 Source <= Destination GL_LEQUAL 6 Source != Destination GL_NOTEQUAL 7 Source < Destination GL_LESS

1.7.4 StencilDepthConfig

FIG. 52 illustrates the data field format for the StencilDepthConfig register. This register controls the stencil and depth units 170 and 168. The 16-bit depth mask field, a 3-bit depth compare function field, and a 1-bit DepthLoad field control the depth unit 170. The StencilMask field determines which bits take part in the stencil compare operation. Destination data is compared to the StencilRef value. StencilFunc specifies how the destination and reference values are compared. The StencilOp* fields determine how to calculate new stencil data. Reserved fields, shown in gray, must be set to 0 to ensure future compatibility.

TABLE 15 StencilDepthConfig Register Field Width Description DepthMask 16 bit  Controls which bits of depth are compared DepthFunc 3 bit Selects compare operation DepthLoad 1 bit Load input accumulators during DPIX StencilMask 8 bit Stencil mask value SencilRef 8 bit Stencil reference value StencilFunc 3 bit Stencil compare operation StencilOpFail 3 bit Stencil operation if stencil test fails StencilOpZfail 3 bit Stencil operation if stencil test passes and depth fails StencilOpZpass 3 bit Stencil operation if stencil test passes and depth passes

The DepthFunc and StencilFunc fields are encoded according to Table 14, above.

The StencilOp* fields are encoded as described in Table 16.

TABLE 16 StencilOp* Field StencilOp Operation OpenGL 0 Destination GL_KEEP 1 0 GL_ZERO 2 Reference GL_REPLACE 3 Destination GL_INVERT 4 Saturate (Destination + 1) GL_INCR 5 Saturate (Destination − 1) GL_DECR 6 Destination + 1 GL_INCRWRAP 7 Destination − 1 GL_DECWRAP

1.7.5 ColorOp[0]

FIG. 53 illustrates the ColorOp[0] register fields. The ColorOp[0] register has control fields for individual alpha, red, green, and blue ROP and blend units 174 and 176. Reserved fields, shown in gray, must be set to 0 to ensure future compatibility.

TABLE 17 ColorOp [0] Register Field Width Description AlphaLogicOp 8 bit Alpha logic operation AlphaBlendOp 3 bit Alpha blend operation RedLogicOp 8 bit Red logic operation RedBlendOp 3 bit Red blend operation GreenLogicOp 8 bit Green logic operation GreenBlendOp 3 bit Green blend operation BlueLogicOp 8 bit Blue logic operation BlueBlendOp 3 bit Blue blend operation

The logic operation fields are encoded according to Microsoft Windows™ conventions for selecting 1 of 256 bitwise Boolean operations of source, destination, and pattern colors. The pattern data comes from the ConstantColor register.

The blend operation fields are encoded as described in Table 18.

TABLE 18 Blend Operation Field BlendOp Operation OpenGL 0 LogicOp (Sc, Dc, Pattern) GL_COLOR_LOGIC_OP 1 Sc*Sf+Dc*Df GL_FUNC_ADD 2 Sc*Sf−Dc*Df GL_FUNC_SUBTRACT 3 Dc*Df−Sc*Sf GL_FUNC_REVERSE_SUBTRACT 4 min (Sc, Dc) GL_MIN 5 max (Sc, Dc) GL_MAX

1.7.6 ColorOp[1]

FIG. 54 illustrates the data field format for the ColorOp[1] register. The ColorOp[1] register has control fields for individual alpha, red, green and blue ROP and blend units 176. Reserved fields, shown in gray, must be set to 0 to ensure future compatibility. Table 19 describes the fields of the ColorOp[1] register.

TABLE 19 ColorOp [1] Register Field Width Description AlphaSize 4 bit Size of alpha data AlphaLoad 1 bit Load alpha accumulator during DPIX AlphaBlendEnable 1 bit Format alpha input for blending AlphaDitherEnable 1 bit Enable alpha dithering RedSize 4 bit Size of red data RedLoad 1 bit Load red accumulator during DPIX RedBlendEnable 1 bit Format red input for blending RedDitherEnable 1 bit Enable red dithering GreenSize 4 bit Size of green data GreenLoad 1 bit Load green accumulator during DPIX GreenBlendEnable 1 bit Format green input for blending GreenDitherEnable 1 bit Enable green dithering BlueSize 4 bit Size of blue data BlueLoad 1 bit Load blue accumulator during DPIX BlueBlendEnable 1 bit Format blue input for blending BlueDitherEnable 1 bit Enable blue dithering

The component size files are encoded as described in Table 20.

TABLE 20 Size Field Encoding Encoding Size 1 1 bit 2 2 bit 3 3 bit 4 4 bit 5 5 bit 6 6 bit 7 7 bit 8 8 bit 9 9 bit 10  10 bit 

1.7.7 ConstantColor

FIG. 55 illustrates the data field format for the ConstantColor register. The ConstantColor register is either used as a pattern data for logic operations or as constant data for blend operations. Reserved fields, shown in gray, must be set to ensure future compatibility. Table 21 describes the field of the ConstantColor register.

TABLE 21 Constant Color Register Field Width Description AlphaConstant 10 bit Alpha constant data RedConstant 10 bit Red constant data GreenConstant 10 bit Green constant data BlueConstant 10 bit Blue constant data

1.7.8 Byte Mask[1:0]

These two registers allow read/write access to the 128-bit Byte Mask. The Byte Mask affects the ML and FL operations.

1.7.9 Plane Mask[7:0]

These 8 registers allow read/write access to the 512-bit Plane Mask. The Plane Mask affects the ML, FL, SPIX and DPIX operations.

1.7.10 ColorWIDLUT[3:0]

These four registers load a Window ID lookup table to select between A buffer (0) or B buffer (1) αRGB color data. During display refresh, the eight-bit WID indexes into the 256-entry Look Up Table (LUT) to produce the select bit.

1.7.11 OverlayWIDLUT[3:0]

These four registers load a Window ID lookup table to select between A buffer (0) or B buffer (1) overlay data. During display refresh, the 8-bit WID indexes into the 256-entry LUT to produce the select bit.

1.7.12 DisplayConfig

FIG. 56 illustrates the data field format of the DisplayConfig register. This register has a 3-bit pixel size field to control the processing of pixel data during RPIX instructions. Reserved fields, shown in gray, must be set to 0 to ensure future compatibility. The PixelSize field is encoded according to Table 11 above.

1.8 Fast Region Clear

The ML, FL, AP, PP, WREG and BREG operations can be used together to clear regions very quickly. The ByteMask[1:0] registers can be used to enable or disable individual pixels within a cache line for writing. The PlaneMask[7:0] registers can be used to enable or disable pixel components for writing.

If individual pixels need to be masked using the ByteMask[1:0] registers, the AP, PP, WREG and ML operations need to be used. Before any pixels are filled, all of the pixels in a 1024-bit cache line are set to the desired clear value and the 512 bit PlaneMask register is set to enable writing only to those bits of the pixel that are to be cleared. Next, the 128-bit ByteMask register is written using two WREG or BREG operations. A ML operation then writes the cache line to the sense amps using the ByteMask and PlaneMask registers. Subsequent WREG and ML operation sequences can be overlapped to support a peak fill rate of 128 bytes every 10 nanoseconds or 12.8 Gigabytes per second. An 80 Megabit device can be filled in 819 microseconds.

If all of the pixels in a page are to be cleared, the 128-bit ByteMask register can be set to all ones, and a sequence of FL operations can be used in place of the WREG, ML operation sequences. The 1024-bit cache line and 512-bit PlaneMask register are set as before. Each FL operation clears one-half of a page, so an entire page can be cleared in 20 nanoseconds. The peak fill rate is 8*128 bytes every 20 nanoseconds or 51.2 Gigabytes per second. An 80 Megabit device can be filled in 205 microseconds. Table 22 shows the peak fill rates for all pixel sizes. FIGS. 57 and 58 illustrate the above described Fast Fills and Really Fast Fill sequence of operations.

TABLE 22 Peak Fast Region Clear Rates Pixel Size ML Fill Rate FL Fill Rate  8 bit 12.8 GP/s 51.2 GP/s  16 bit 6.4 GP/s 25.6 GP/s  32 bit 3.2 GP/s 12.8 GP/s  64 bit 1.6 GP/s 6.4 GP/s 128 bit 800 MP/s 3.2 GP/s 256 bit 400 MP/s 1.6 GP/s 512 bit 200 MP/s 800 MP/s

2.0 DATA ROUTING

Many of the novel features of the Dual Pixel 3DRAM chip 110, and the graphics system based upon the chip, are implemented by the chip's 110 four data formatters 130, 134, 140 and 144. Throughout this section of the disclosure, the SRAM pixel buffer 118 is depicted as two separate functional blocks because many of the processing and routing modes disclosed herein relate to modes of operation where two pixels are being processed simultaneously. It shall therefore be understood that the SRAM pixel buffer 118 may be viewed functionally as being divided into two portions.

2.1 Input Data Formatter

Referring to FIG. 59, this section describes the routing and processing of incoming data over the I/O bus 124 to the pixel ALUs 120 and 121. Pixel ALU write operations transfer either 72 bits of data in two clocks, or 108 bits of data in three clocks, depending on the format and size of the pixels being processed. Incoming data passes through the input data demultiplexer 126 as close to the pins as possible and is presented to the Pixel ALUs in parallel as either 72 bits or 108 bits. The Pixel ALUs 120 and 121 have the following inputs for source data: Alpha0[10:0], Red0[10:0], Green0[10:0], Blue0[10:0], Depth0[31:0], Alpha1[10:0], Red1[10:0], Green1[10:0], Blue1[10:0], and Depth1[31:0]. The routing is controlled by a 4-bit register field.

2.1.1 Pixel Compression

When performing a 3-dimensional pixel merge, the rendering controller needs to transmit only color and depth information; stencil and window ID information can be stored in registers. When rendering a triangle or surface patch, the generated pixels usually exhibit a great deal of coherency. This section describes a novel, lossless compression scheme to transmit pixel pairs across the data pins in the minimal number of clock cycles.

This scheme evaluates the differences between pixel pairs and between the most recently processed (old) pixel pair and the incoming (new) pixel pair. Because there is frequently a high degree of coherency between the pixels in a pair, as well as between two sequentially processed pixel pairs, the incoming pixel data may sometimes be expressed in significantly fewer bits. Under such circumstances, all that need be transmitted is the differences between the old pixel pair and the new one, expressed in the least significant bits of the new pixel pair. In the best cases, where a high degree of coherency between pixel pairs is observed, a 2-to-1 compression rate may be achieved, effectively doubling the input bandwidth from the rendering controller 102 to the Dual Pixel 3DRAM chip 110. Where a moderate degree of coherency is observed, a 4-to-3 compression rate may be achieved. And where little coherency is observed, no compression is permitted.

Dual Pixel 3DRAM 110 stores the most recently transmitted pixel pair in a set of registers with 32 bits for each depth value and 10 bits for each of the four color components. Thus, 72 bits of data per pixel are transmitted over the rendering bus 112. Since pixels are frequently processed in pairs on the Dual Pixel 3DRAM chip 110, complete data for a pair of pixels is expressed in 144 bits. Because texture mapping tends to reduce the coherency of color values, we are less likely to save bandwidth by compressing color values. Depth values, however, will very often exhibit a great deal of coherency. Thus, the disclosed compression scheme takes advantage of the high rate of coherency between depth values. Described below is the algorithm for compressing and uncompressing pixel data.

Both the rendering controller 102 and the Dual Pixel 3DRAM chip 110 store the pixel pair that was most recently transmitted. Listed below are “old” pixels 0 and 1, broken out in their color (alpha, red, green and blue) and depth (z)components.

OA0, OR0, OG0, OB0, OZ0

OA1, OR1, OG1, OB1, OZ1

As part of its normal rendering processing, the rendering controller 102 calculates a new pixel pair. In many cases, the old and new pixel components will have similar values, and the new pixel pairs will also have similar values. Listed below are “new” pixels 0 and 1, broken out in their color (alpha, red, green and blue) and depth (z)components.

NA0, NR0, NG0, NB0, NZ0

NA1, NR1, NG1, NB1, NZ1

If pixel components have similar values, their differences will be small and can be represented by fewer bits than the components themselves. Pixel component differences are calculated by the rendering controller 102 using the equations listed below, where the prefix “D” stands for difference or delta:

DA0=NA0−OA0; DA1=(NA1−OA1)−(NA0−OA0);

DR0=NR0−OR0; DR1=(NR1−OR1)−(NR0−OR0);

DG0=NG0−OG0; DG1=(NG1−OG1)−(NG0−OG0);

DB0=NB0−OB0; DB1=(NB1−OB1)−(NB0−OB0);

DZ0=NZ0−OZ0; DZ1=(NZ1−OZ1)−(NZ0−OZ0);

Only the calculated differences are transmitted from the rendering controller 102 to Dual Pixel 3DRAM chip 110, thereby reducing the number of bits per pixel transmitted over the rendering bus 112. The new pixel components are recovered by the input data formatter 130 on the Dual Pixel 3DRAM chip 110 in the following manner:

NA0=OA0+DA0; NA1=OA1+DA0+DA1

NR0=OR0+DR0; NR1=OR1+DR0+DR1

NG0=OG0+DG0; NG1=OG1+DG0+DG1

NB0=OB0+DB0; NB1=OB1+DB0+DB1

NZ0=OZ0+DZ0; NZ1=OZ1+DZ0+DZ1

Referring to FIG. 60, the input data formatter 130 implements its decompression scheme in three layers. The first layer extracts the 10 difference components from a variety of formats and sign extends them if needed. The second layer adds the differences to the previous pixel components to recover the new pixel components. The third layer formats the new pixel components. Color components are shifted left according their final width, and the upper 16 bits of the depth values are masked.

2.1.2 Input Data Formats

As listed in Table 23 below, Dual Pixel 3DRAM 110 has the following input data formats. If the operation is WDAT or BDAT, the input format is forced to mode 0 regardless of how the registers are programmed. If the operation is SPIX, the input format is forced to mode 7. If the operation is DPIX, the input format is set by writing to the InputMode register field. Modes 0 and 1 are used for 2-dimensional pixel updates where depth is not needed. Mode 2 is used during anti-aliasing operations. Modes 4 and 5 are used for 3-dimensional pixel updates. FIG. 61 illustrates all of the possible formats for data being transmitted across the rendering bus 112 from the rendering controller 102 to the input data formatter 130.

TABLE 23 Bit field allocations in input data formats Fill Alpha Red Green Blue Depth Mode Op Cycles Rate DA0 DA1 DR0 DR1 DG0 DG1 DB0 DB1 DZ0 DZ1 0 WDAT 2 400 8 8 8 8 8 8 8 8 — — BDAT 3 267 10  10  10  10  10  10  10  10  — — DPIX 1 DPIX 2 400 2 2 10  10  10  10  10  10  — — 2 DPIX 2 400 — — — — — — — — 32 32 4 DPIX 2 400 6 4 6 4 6 4 6 4 18 14 3 267 8 6 8 6 8 6 8 6 28 24 5 DPIX 2 400 2 2 7 5 7 5 7 5 18 14 3 267 2 2 10  7 10  7 10  7 28 24 7 SPIX 2 200 10 10 10 10 32

2.1.3 Accumulators

FIG. 62 illustrates the implementation of the accumulator layer of the input data formatter. The same 10-bit color accumulator design is used for processing alpha, red, green and blue data, while similarly designed 32-bit accumulators are used for processing depth data. During WDAT, BDAT and SPIX operations, difference data is loaded directly into the accumulators. During DPIX operations, the loading of difference data is controlled by register bits.

2.1.4 Final Formatting

FIG. 63 illustrates the final format layer of the input data formatter 130. Color components are shifted left according to the number of bits that will be used by the ROP/Blend units 166. If the component is to be blended, a 1 is appended to the right of the least significant bit. Listed below are two verilog functions which perform the color and depth formatting of the final layer of processing within the input data formatter 130.

function [10:0] FormatColor; input [9:0] Data; // Raw color component data input [3:0] Size; // Size of color component input Blend; // Set if colors are to be blended begin casex(Size) 4′b0001: FormatColor = {Data[ 0], Blend, 9═b000000000}; // 1 bit 4′b0010: FormatColor = {Data[1:0], Blend, 8′b00000000}; // 2 bits 4′b0011: FormatColor = {Data[2:0], Blend, 7′b0000000}; // 3 bits 4′b0100: FormatColor = {Data[3:0], Blend, 6′b000000}; // 4 bits 4′b0101: FormatColor = {Data[4:0], Blend, 5′b00000}; // 5 bits 4′b0110: FormatColor = {Data[5:0], Blend, 4′b0000}; // 6 bits 4′b0111: FormatColor = {Data[6:0], Blend, 3′b000}; // 7 bits 4′b1000: FormatColor = {Data[7:0], Blend, 2′b00}; // 8 bits 4′b1001: FormatColor = {Data[8:0], Blend, 1′b0}; // 9 bits 4′b1010: FormatColor = {Data[9:0], Blend}; // 10 bits default: FormatColor = ′bx; endcase end endfunction

The upper 16 bits of the depth value are bitwise anded with the DepthMask register field.

function[31:0]FormatDepth;

input[31:0]Data; // Raw depth data

input[15:0]Mask; // Mask

begin

FormatDepth={Data[31:16] & Mask, Data[15:0]};

end

endfunction

2.2 Output Data Formatter

When the operation is RDAT or when the operation is RPIX and the PixelSize field of the DisplayConfig register is set to 8, 16, 32 bit pixels, the formatter selects 64 bits of data from the 1024 cache line according to the P[3:0] bits of the operation. The ColorWIDLUT and OverlayWIDLUT registers are ignored in this case.

When the operation is RPIX and the PixelSize field of the DisplayConfig register is set to 64 bit pixels, the formatter extracts the 8 bit WID fields from the pair of 64 bit pixels addressed by the P[3:1] bits of the operation. The extracted WID fields index into the ColorWIDLUT to produce a pair of color A/B buffer selects. The extracted WID fields index into the OverlayWIDLUT to produce a pair of 16/32 bit selects.

The 16/32 bit selects determine whether to send all 32 bits of color data over the DQ pins or whether to send only 16 bits of color data over the DQ pins. In the latter case, the A/B buffer selects determine whether to send the upper or lower 16 bits of color data over the DQ pins.

When the operation is RPIX and the PixelSize field of the DisplayConfig register is set to 128 bit pixels, the formatter extracts the 8 bit WID fields from the pair of 128 bit pixels addressed by the P[3:2] bits of the operation. The extracted WID fields index into the ColorWIDLUT to produce a pair of color A/B buffer selects. The extracted WID fields index into the OverlayWIDLUT to produce a pair of overlay A/B buffer selects.

The color A/B buffer selects determine whether to transmit the A or B color buffer data over the DQ pins. The overlay A/B buffer selects determine whether to transmit the A or B overlay data over the DQ pins.

Referring to FIG. 64, this section describes the routing and processing of outgoing data from the SRAM pixel buffer 118 to the rendering controller 102. The outgoing data is transmitted over the SRAM output data bus 132 to the output data formatter 134. The output data formatter 134 operates in different modes, depending on the pixel format that is being transmitted off the Dual Pixel 3DRAM chip 110. Modes are set by the mode register.

This path is used by the RDAT and RPIX operations, wherein 256 bits of data are read out of the SRAM pixel buffer 118, and either 72 or 108 bits of data are extracted from the 256 bits, and then sent to the output data multiplexer 136 for transmission off the chip 110 to the rendering controller 102 over the rendering bus 112. The RDAT operation reads 64 bits of data in two cycles while the RPIX operation reads one to eight pixels in two or three cycles.

2.2.1 RDAT, RPIX (8-, 16-, 32-bit pixel) Operation

FIG. 65 illustrates the RDAT and RPIX operations for 8, 16, and 32-bit pixel formats. In this mode, 64 bits are selected from the 1024-bit cache line. The SRAM pixel buffer 118 provides 256 bits which are muxed down to 64 bits.

In this mode, 64 contiguous bits are selected from the 1024-bit cache line and presented to the output data multiplexer 136.

2.2.2 RPIX (64-bit pixel) Operation

FIGS. 67-70 illustrate various modes and aspects of the 64-bit RPIX operation. In the mode depicted in FIG. 67, two contiguous 64-bit pixels are selected from the 1024-bit cache line, ignoring P[0].

In the mode depicted in FIG. 68, 2 contiguous 64-bit pixels are selected from the 1024-bit cache line, ignoring P[0], and are then processed and presented to the output data multiplexer 136.

The even 64-bit pixel is processed as shown in FIG. 69 to produce a 36-bit output to the output data multiplexer 136. The window ID bits determine whether the color data is 16-bit double buffered, or 32-bit single buffered, and if double buffered, whether to select the A or B buffer. The eight window ID bits index into the 256-bit ColorWIDLUT and 256-bit OverlayWIDLUT registers to produce the select bits.

The odd 64-bit pixel is processed as shown in FIG. 70 to produce a 36-bit output to the output data multiplexer 136. The window ID bits determine whether the color data is 16-bit double buffered or 32-bit single buffered, and if double buffered, whether to select the A or B buffer.

2.2.3 RPIX (96-bit pixel) Operation

FIGS. 71-74 illustrate various modes and aspects of the 96-bit RPIX operation. As illustrated in FIG. 71, in this mode, 2 contiguous 96-bit pixels are selected from the 1024-bit cache line, ignoring P[0].

The two 96-bit pixels are processed in parallel as shown in FIG. 72 to produce two 48-bit outputs to the output data multiplexer 136. The window ID bits determine whether to select the A or B buffer. FIGS. 73 and 74 show how window IDs and single buffered overlays for both pixels are handled. FIG. 74 illustrates the data path for the lower 3 bytes of color data.

2.2.4 RPIX (128-bit pixel) Operation

FIGS. 75-78 illustrate various aspects of the 128-bit pixel RPIX operation. In the mode depicted in FIG. 75, 2 contiguous 128-bit pixels are selected from the 1024-bit cache line, ignoring P[1:0].

In the mode illustrated in FIG. 76, 2 contiguous 128-bit pixels are selected from the 1024 bit cache line, ignoring P[1:0], processed and them presented to the output data multiplexer 136.

The even 128-bit pixel is processed as shown in FIG. 77, to produce a 48-bit output to the output data multiplexer 136. The window ID bits select A or B buffer color, and A or B buffer overlay.

The odd 128-bit pixel is processed as shown in FIG. 78 to produce 48-bit output to the output data multiplexer 136. The window ID bits select A or B buffer color, and A or B buffer overlay.

2.3 SRAM-to-Pixel ALU Routing

Routes destination data from the SRAM to the Pixel ALU. Reads 256 bits of data from the SRAM and routes appropriate fields to the following Pixel ALU inputs. Alpha0[10:0], Red0[10:0], Green0[10:0], Blue0[10:0], Depth0[31:0], Stencil0[7:0], WID0[7:0], Alpha1[10:0], Red1[10:0], Green1[10:0], Blue1[10:0], Depth1[31:0], Stencil1[7:0], and WID1[7:0]. All Pixel ALU inputs are masked by register values.

The SRAM→DQ and SRAM→PALU routing blocks will never be used at the same time so whatever circuitry they have in common can be shared.

The SRAM→PALU routing can be done in two phases. The first phase selects 32-bit sections of each pixel based on the pixel's size, address, and A/B color buffer select. The second phase unpacks color, depth, stencil, and WID fields according to A/B select, colormode, and various masks.

2.3.1 SRAM Organization of 8-, 16-, and 32-bit Pixels

These pixels contain only alpha, red, green, and blue data. Each operation deals with 64 bits worth of pixels which are evenly split across both halves of the SRAM.

2.3.2 SRAM organization of 64-bit pixels

Each operation can deal with two pixels residing in both halves of the SRAM. The ‘ab’ section of each pixel contains color data and the ‘de’ section contains depth, stencil, overlay, and WID data.

2.3.3 SRAM organization of 96 bit pixels

Again, each operation can deal with two pixels but their sections are somewhat scrambled. Each pixel has separate ‘a’ and ‘b’ color sections.

2.3.4 SRAM organization of 128 bit pixels

Each operation can deal with two pixels residing in both halves of the SRAM. The depth value is stored in its own section ‘d’ while stencil, overlay, and WID are stored in section ‘e’.

2.3.5 UnpackColors

UnpackColors selects 64 bits of color data from the SRAM based on PixelSize, PixelAddress, and BufferSelect.

function[63:0]UnpackColors;

input[255:0]Data;

input[2:0]PixelSize;

input[3:0]PixelAddress;

input[1:0]BufferSelect;

begin

casex({PixelSize, PixelAddress, BufferSelect[1]})

// 8, 16, 32 bit pixels

8′b000_xx00_x: UnpackColors={Data[159:128], Data[31:0]};

8′b000_xx01_x: UnpackColors={Data[191:160], Data[63:32]};

8′b000_xx10_x: UnpackColors={Data[223:192], Data[95:64]};

8′b000_xx11_x: UnpackColors={Data[255:224], Data[127:96]};

// 64 bit pixels

8′b001_xx0x_x: UnpackColors={Data[159:128], Data[31:0]};

8′b001_xx1x_x: UnpackColors={Data[223:192], Data[95:64]};

// 96 bit pixels

8′b010_x00x_(—)0: UnpackColors={Data[159:128], Data[31:0]};

8′b010_x00x_(—)1: UnpackColors={Data[191:160], Data[63:32]};

8′b010_x01x_(—)0: UnpackColors={Data[159:128], Data[95:64]};

8′b010_x01x_(—)1: UnpackColors={Data[191:160], Data[127:96]};

8′b010_x10x_(—)0: UnpackColors={{32{1′bx}}, Data[31:0]};

8′b010_x10x_(—)1: UnpackColors={{32{1′bx}}, Data[63:32]};

// 128 bit pixels

8′b011_xxxx_(—)0: UnpackColors={Data[159:128], Data[31:0]};

8′b011_xxxx_(—)1: UnpackColors={Data[191:160], Data[63:32]};

default: UnpackColors=′bx;

endcase

end

endfunction

2.3.6 UnpackDepths

UnpackDepths selects 64 bits worth of depth, stencil, overlay, and WID based on PixelSize and PixelAddress.

function[63:0]UnpackDepths;

input[255:0]Data;

input[2:0]PixelSize;

input[3:0]PixelAddress;

begin

casex({PixelSize, PixelAddress})

// 64 bit pixels

7′b001_xx0x: UnpackDepths={Data[191:160], Data[63:32]};

7′b001_xx1x: UnpackDepths={Data[255:224], Data[127:96]};

// 96 bit pixels

7′b010_x0xx: UnpackDepths={Data[223:192], Data[255:224]};

7′b010_x10x: UnpackDepths={{32{1′bx}}, Data[95:64]};

// 128 bit pixels

7′b011_xxxx: UnpackDepths={Data[223:192], Data[95:64]};

default: UnpackDepths=′bx;

endcase

end

endfunction

2.3.7 UnpackExtras

UnpackExtras selects 64 bits worth of stencil, overlay, and WID based on PixelSize and PixelAddress. Unpack-Depths and UnpackExtras return the same data for 64 and 96 bit pixels.

function[63:0]UnpackExtras;

input[255:0]Data;

input[2:0]PixelSize;

input[3:0]PixelAddress;

begin

casex({PixelSize, PixelAddress})

// 64 bit pixels

7′b001_xx0x: UnpackExtras={Data[191:160], Data[63:32]};

7′b001_xx1x: UnpackExtras={Data[255:224], Data[127:96]};

// 96 bit pixels

7′b010_x0xx: UnpackExtras={Data[223:192], Data[255:224]};

7′b010_x10x: UnpackExtras={{32{1′bx}}, Data[95:64]};

// 128 bit pixels

7′b011_xxxx: UnpackExtras={Data[255:224], Data[127:96 ]};

default: UnpackExtras=′bx;

endcase

end

endfunction

2.3.8 UnpackAlpha, UnpackRed, UnpackGreen, UnpackBlue

These functions unpack alpha, red, green, and blue data from a 32-bit color section. UnpackAlpha also needs the 32-bit extra section. ColorMode and BufferSelect determine how the colors are unpacked.

function[10:0]UnpackAlpha;

input[31:0]Color;

input[31:0]Extra;

input[3:0]ColorMode;

input[1:0]BufferSelect;

begin

casex({ColorMode, BufferSelect[0]})

5′b0000_x: UnpackAlpha={Color[31:24], 3′b100};

5′b0001_x: UnpackAlpha={Extra[31:24], 3′b100};

5′b0010_x: UnpackAlpha={11{1′b1}};

5′b0011_(—)0: UnpackAlpha={Extra[7:0], Color[31:30], 1′b1};

5′b0011_(—)1: UnpackAlpha={Extra[15:8], Color[31:30], 1′b1};

5′b0100_(—)0: UnpackAlpha={Color[15:12], 7′b1000000};

5′b0100_(—)1: UnpackAlpha={Color[31:28], 7′b1000000};

5′b0101_(—)0: UnpackAlpha={Color[15:8], 3′b100};

5′b0101_(—)1: UnpackAlpha={Color[31:24], 3′b100};

5′b0110_x: UnpackAlpha={11{1′b1}};

5′b0111_(—)0: UnpackAlpha={11{Color[15]}};

5′b0111_(—)1: UnpackAlpha={11{Color[31]}};

default: UnpackAlpha=′bx;

endcase

end

endfunction

function[10:0]UnpackRed;

input[31:0]Color;

input[3:0]ColorMode;

input[1:0]BufferSelect;

begin

casex({ColorMode, BufferSelect[0]})

5′b0000_x: UnpackRed={Color[23:16], 3′b100};

5′b0001_x: UnpackRed={11{1′b1}};

5′b001x_x: UnpackRed={Color[29:20], 1′b1};

5′b0100_(—)0: UnpackRed={Color[11:8], 7′b1000000};

5′b0100_(—)1: UnpackRed={Color[27:24], 7′b1000000};

5′b0101_(—)0: UnpackRed={Color[7:0], 3′b100};

5′b0101_(—)1: UnpackRed={Color[23:16], 3′b100};

5′b0110_(—)0: UnpackRed={Color[15:11], 6′b100000};

5′b0110_(—)1: UnpackRed={Color[31:27], 6′b100000};

5′b0111_(—)0: UnpackRed={Color[14:10], 6′b100000};

5′b0111_(—)1: UnpackRed={Color[30:26], 6′b100000};

default: UnpackRed=′bx;

endcase

end

endfunction

function[10:0]UnpackGreen;

input[31:0]Color;

input[3:0]ColorMode;

input[1:0]BufferSelect;

begin

casex({ColorMode, BufferSelect[0]})

5′b0000_x: UnpackGreen={Color[15:8], 3′b100};

5′b0001_x: UnpackGreen={11{1′b1}};

5′b001x_x: UnpackGreen={Color[19:10], 1′b1};

5′b0100_(—)0: UnpackGreen={Color[4:7], 7′b1000000};

5′b0100_(—)1: UnpackGreen={Color[23:20], 7′b1000000};

5′b0110_(—)0: UnpackGreen={Color[10:5], 5′b10000};

5′b0110_(—)1: UnpackGreen={Color[26:21], 5′b10000};

5′b0111_(—)0: UnpackGreen={Color[9:5], 6′b100000};

5′b0111_(—)1: UnpackGreen={Color[25:21], 6′b100000};

default: UnpackGreen=′bx;

endcase

end

endfunction

function[10:0]UnpackBlue;

input[31:0]Color;

input[3:0]ColorMode;

input[1:0]BufferSelect;

begin

casex({ColorMode, BufferSelect[0]})

5′b0000_x: UnpackBlue={Color[7:0], 3′b100};

5′b0001_x: UnpackBlue={{11{1′b1}};

5′b001x_x: UnpackBlue={Color[9:0], 1′b1};

5′b0100_(—)0: UnpackBlue={Color[3:0], 7′b1000000};

5′b0100_(—)1: UnpackBlue={Color[19:16], 7′b1000000};

5′b011x_(—)0: UnpackBlue={Color[4:0], 6′b100000};

5′b011x_(—)1: UnpackBlue={Color[20:16], 6′b100000};

default: UnpackBlue=′bx;

endcase

end

endfunction

2.3.9 UnpackDepth

UnpackDepth masks out stencil, overlay, and WID data using DepthMask.

function[31:0]UnpackDepth;

input[31:0]Depth;

input[15:0]DepthMask;

begin

UnpackDepth={(Depth[31:16] & DepthMask), Depth[15:0]};

end

endfunction

2.3.10 UnpackStencil

UnpackStencil masks out depth data using StencilMask.

function[7:0]UnpackStencil;

input[31:0]Extra;

input[7:0]StencilMask;

begin

UnpackStencil=Extra[23:16] & StencilMask;

end

endfunction

2.3.11 UnpackWid

UnpackWid masks out overlay data using WidMask.

function[7:0]UnpackWid;

input[31:0]Extra;

input[7:0]WidMask;

begin

UnpackWid=Extra[31:24] & WidMask;

end

endfunction

2.3.12 SramToPaluData

SramToPaluData unpacks 32-bit color, depth, and extra sections for two pixels from 256 bits of SRAM data. The alpha, red, green, blue, depth, stencil, and WID fields

function[183:0]SramToPaluData;

input[255:0]Data;

input[2:0]PixelSize;

input[3:0]PixelAddress;

input[1:0]BufferSelect;

input[3:0]ColorMode;

input[31:0]DepthMask;

input[7:0]StencilMask;

input[7:0]WidMask;

reg[31:0]Color1, Color0;

reg[31:0]Depth1, Depth0;

reg[31:0]Extra1, Extra0;

begin

{Color1, Color0}=UnpackColors(Data, PixelSize, PixelAddress, BufferSelect);

{Depth1, Depth0}=UnpackDepths(Data, PixelSize, PixelAddress);

{Extra1, Extra0}=UnpackExtras(Data, PixelSize, PixelAddress);

SramToPaluData={

UnpackWid(Extra1, WidMask),

UnpackStencil(Extra1, StencilMask),

UnpackDepth(Depth1, DepthMask),

UnpackAlpha(Color1, ColorMode, BufferSelect),

UnpackRed(Color1, ColorMode, BufferSelect),

UnpackGreen(Color1, ColorMode, BufferSelect),

UnpackBlue(Color1, ColorMode, BufferSelect),

UnpackWid(Extra0, WidMask),

UnpackStencil(Extra0, StencilMask),

UnpackDepth(Depth0, DepthMask),

UnpackAlpha(Color0, ColorMode, BufferSelect),

UnpackRed(Color0, ColorMode, BufferSelect),

UnpackGreen(Color0, ColorMode, BufferSelect),

UnpackBlue(Color0, ColorMode, BufferSelect)

};

end

endfunction

2.4 Pixel ALU-to-SRAM Data Routing

Routes result data from the Pixel ALU to the SRAM. Alpha0[9:0], Red0[9:0], Green0[9:0], blue0[9:0], Depth0[31:0], Stencil0[7:0], DT0, ST0, WT0, Alpha1[9:0], Red1[9:0], Green1[9:0], Blue1[9:0], Depth1[31:0], Stencil1[7:0], DT1, ST1, and WT1. Each bit of data written to the SRAM has its own write enable.

This datapath can almost be split into two parts; 32 bits of data must be sent from the ‘0’ half to the ‘1’ half. Each half has a ColorPack unit, a DepthPack unit, and an ExtraPack unit. The ColorPack units reformat the ROP/blend unit results. The DepthPack units reformat the Depth, Stencil and Alpha ROP/Blend unit results. The ExtraPack units reformat the Alpha and Stencil unit results.

2.4.1 PackColor

PackColor takes 40 bits of color data and packs it into a 32 bit word according to ColorMode. This function is used by all pixel sizes.

function[31:0]PackColor;

input[3:0]ColorMode

input[9:0]Alpha, Red, Green Blue;

begin

case(ColorMode)

4′d0: PackColor={Alpha[9:2], Red[9:2], Green[9:2], Blue[9:2]};

4′d2: PackColor={2′d0, Red[9:0], Green[9:0], Blue[9:0]};

4′d3: PackColor={Alpha[1:0], Red[9:0], Green[9:0], Blue[9:0]};

4′d4: PackColor={2{Alpha[9:6], Red[9:6], Green[9:6], Blue[9:6]};

4′d6: PackColor={2{Red[9:5], Green[9:4], Blue[9:5]};

4′d7: PackColor={2{Alpha[9], Red[9:5], Green[9:5], Blue[9:5]}};

endcase

end

endfunction

2.4.2 PackDepth

PackDepth takes depth, stencil, and alpha data and packs it into a 32 bit word according to DepthMask.

function[31:0]PackDepth;

input[15:0]DepthMask;

input[31:0]Depth;

input[7:0]Stencil;

input[7:0]Alpha;

begin

PackDepth[31:24]=(DepthMask[15:8] & Depth[31:24])|(˜DepthMask[15:8] & Alpha);

PackDepth[23:16]=(DepthMask[7:0] & Depth[23:16])|(˜DepthMask[7:0] & Stencil);

PackDepth[15:0]=Depth[15:0];

end

endfunction

2.4.3 PackExtra

PackExtra takes stencil, and alpha data and packs it into a 32-bit word.

function[31:0]PackExtra;

input[7:0]Stencil;

input[7:0]Alpha;

begin

PackExtra={Alpha, Stencil, Alpha, Alpha};

end

endfunction

2.4.4 PaluToSramData

PaluToSramData takes Pixel ALU result and packs it into a 256-bit word to be written to memory. The PixelSize and PixelAddress inputs determine the overall pixel format while ColorMode, AlphaMask, and StencilMask determine the detailed formatting of data.

function[255:0]PaluToSramData;

// Per pixel info

input[3:0]PixelAddress;

input[9:0]Alpha0, Red0, Green0, Blue

input[9:0]Alpha1, Red1, Green1, Blue1;

input[31:0]Depth1, Depth0;

input[7:0]Stencil1, Stencil0;

// Register field info

input[2:0]PixelSize;

input[2:0]ColorMode;

input[31:0]DepthMask;

reg[31:0]CP1, CP0, DP1, DP0, EP1, EP0;

reg[255:0]Data;

begin

CP0=ColorPack(ColorMode, Alpha0, Red0, Green0, Blue0);

CP1=ColorPack(ColorMode, Alpha1, Red1, Green1, Blue1);

DP0=DepthPack(DepthMask, Depth0, Stencil0, Alpha0);

DP1=DepthPack(DepthMask, Depth1, Stencil1, Alpha1);

EP0={(3{Alpha0}}, Stencil0};

EP1={{3(Alpha1}}, Stencil1};

casex({PixelSize, PixelAddress))

7′b000_xxxx: Data={CP1, CP1, CP1, CP1, CP0, CP0, CP0, CP0);

7′b001_xxxx: Data={DP1, CP1, DP1, CP1, DP0, CP0, DP0, CP0};

7′b010_x0xx: Data={DP0, DP1, CP1, CP1, CP0, CP0, CP0, CP0};

7′b010_x1xx: Data={DP0, DP1, CP1, CP1, CP0, DP0, CP0, CP0};

7′b011_xxxx: Data={EP1, DP1, CP1, CP1, EP0, DP0, CP0, CP0};

endcase

PaluToSramData=Data;

end

endfunction

2.5 Pixel ALU-to-SRAM Mask Generation

Generates a 256 bit write mask for the Pixel ALU→SRAM datapath.

2.5.1 WriteEnableMask

WriteEnableMask expands the byte write enable bits into a 256 bit word. The byte write enables are used to select individual 8-, 16-, and 32-bit pixels. They should only be used for 8-, 16-, and 32-bit pixels.

function[255:0]WriteEnableMask;

input[7:0]WriteEnable;

reg[31:0]Mask1, Mask0;

begin

Mask0={{8{WriteEnable[3]}}, {8{WriteEnable[2]}}, {8{WriteEnable[1]}}, {8{WriteEnable[0]}}};

Mask1={{8{WriteEnable[7]}}, {8{WriteEnable[6]}}, {8{WriteEnable[5]}}, {8{WriteEnable[4]}}};

WriteEnableMask={{4{Mask1}}, {4{Mask0}}};

end

endfunction

2.5.2 Pixel Address Mask

Pixels larger than 32 bits are generally divided into 32 bit sections. PixelAddressMask uses DualPixel, PixelAddress, and PixelSize to determine which 32 bit sections of the 256 bit word should be written to.

function [255:0] PixelAddressMask;   input DualPixel;   input [3:0] PixelAddress;   input [2:0] PixelSize;   reg [1:0] PixelEnable;   reg [7:0] WordEnable;

begin

casex({PixelSize, DualPixel, PixelAddress})

8′b000_x_xx00: WordEnable=8′b0001_(—)0001; // 8,16,32 bit

8′b000_x_xx01: WordEnable=8′b0010_(—)0010; // 8,16,32 bit

8′b000_x_xx10: WordEnable=8′b0100_(—)0100; // 8,16,32 bit

8′b000_x_xx11: WordEnable=8′b1000_(—)1000; // 8,16,32 bit

8′b001_(—)0_xx00: WordEnable=8′b0000_(—)0011; // 64 bit single

8′b001_(—)0_xx01: WordEnable=8′b0011_(—)0000; // 64 bit single

8′b001_(—)0_xx10: WordEnable=8′b0000_(—)1100; // 64 bit single

8′b001_(—)0_xx11: WordEnable=8′b1100_(—)0000; // 64 bit single

8′b001_(—)1_xx0x: WordEnable=8′b0011_(—)0011; // 64 bit dual

8′b001_(—)1_xx1x: WordEnable=8′b1100_(—)1100; // 64 bit dual

8′b010_(—)0_x000: WordEnable=8′b1000_(—)0011; // 96 bit single

8′b010_(—)0_x001: WordEnable=8′b0111_(—)0000; // 96 bit single

8′b010_(—)0_x010: WordEnable=8′b1000_(—)1100; // 96 bit single

8′b010_(—)0_x011: WordEnable=8′b0111_(—)0000; // 96 bit single

8′b010_(—)0_x100: WordEnable=8′b0000_(—)0111; // 96 bit single

8′b010_(—)0_x101: WordEnable=8′b0000_(—)0000; // 96 bit single

8′b010_(—)0_x11x: WordEnable=8′b0000_(—)0000; // 96 bit single

8′b010_(—)1_x00x: WordEnable=8′b1111_(—)0011; // 96 bit dual

8′b010_(—)1_x01x: WordEnable=8′b1111_(—)1100; // 96 bit dual

8′b010_(—)1_x10x: WordEnable=8′b0000_(—)0111; // 96 bit dual

8′b010_(—)1_x11x: WordEnable=8′b0000_(—)0000; // 96 bit dual

8′b011_(—)0_xx0x: WordEnable=8′b0000_(—)1111; // 128 bit single

8′b011_(—)0_xx1x: WordEnable=8′b1111_(—)0000; // 128 bit single

8′b011_(—)1_xxxx: WordEnable=8′b1111_(—)1111; // 128 bit dual

endcase

PixelAddressMask={

{32{WordEnable[7]}}, {32{WordEnable[6]}},

{32{WordEnable[5]}}, {32{WordEnable[4]}},

{32{WordEnable[3]}}, {32{WordEnable[2]}},

{32{WordEnable[1]}}, {32{WordEnable[0]}}};

end

endfunction

10 2.5.3 MaskDepth

MaskDepth is analogous to DepthPack except that the data inputs are replaced by write enables.

function [31:0] MaskDepth; input [15:0] DepthMask; input ColorEnable; input DepthEnable; input StencilEnable; begin MaskDepth[31:24] = (  DepthMask[15:8] & {8{DepthEnable}}) | (˜DepthMask[15:5] & {8{ColorEnable}}); MaskDepth[23:16] = (  DepthMask[ 7:0] & {8{DepthEnable}}) | (˜DepthMask] 7:0] & {8{StencilEnable}}); MaskDepth[15: 0] = {16{DepthEnable}}; end endfunction

2.5.4 EnableMask

EnableMask separately enables (or disables) the color, depth, and stencil fields of a pixel. The WID, stencil and depth tests performed by the Pixel ALU determine which fields are written to.

function[255:0]EnableMask;

input[3:0]PixelAddress;

input ColorEnable1, ColorEnable0;

input DepthEnable1, DepthEnable0;

input StencilEnable1, StencilEnable0;

input[2:0]PixelSize;

input[31:0]DepthMask;

reg[31:0]CM1, CM0, DM1, DM0, EM1, EM0;

begin

CM0={32{ColorEnable0}};

CM1={32{ColorEnable1}};

DM0=DepthMask(DepthMask, ColorEnable0, DepthEnable0, StencilEnable0);

DM1=DepthMask(DepthMask, ColorEnable1, DepthEnable1, StencilEnable1);

EM0={{24{ColorEnable0}}, {8(StencilEnable0}}};

EM1={{24{ColorEnable1}}, (8{StencilEnable1)}};

Casex({PixelSize, PixelAddress})

7′b000-xxxx: EnableMask=(CM1, CM1, CM1, CM1, CM0, CM0, CM0, CM0);

7′b001-xxxx: EnableMask={DM1, CM1, DM1, CM1, DM0, CM0, DM0, CM0);

7′b010-x0xx: EnableMask={DM0, DM1, CM1, CM1, CM0, CM0, CM0, CM0);

7′b010-x1xx: EnableMask={DM0, DM1, CM1, CM1, CM0, DM0, CM0, CM0}

7′b011-xxxx: EnableMask={EM1, DM1, CM1, CM1, EM0, DM0, CM0, CM0};

endcase

end

endfunction

2.5.5 SelectPlaneMask

SelectPlaneMask selects the appropriate 128 bit sections from the 512-bit Plane Mask register.

function[255:0]SelectPlaneMask;

input[3:0]PixelAddress;

input[2:0]PixelSize;

input[511:0]PlaneMask;

begin

casex({PixelSize, PixelAddress})

7′b00x-x0xx: SelectPlaneMask=PlaneMask[255:01;

7,b010-x00x: SelectPlaneMask=PlaneMask[255:0];

7′b010-x01x: SelectPlaneMask={PlaneMask[511:384], PlaneMask[127:0]};

7,b011-x0xx: SelectPlaneMask=PlaneMask[255:0];

7′b1xx-x0xx: SelectPlaneMask=PlaneMask[255:01;

7′bxxx-x1xx: SelectPlaneMask=PlaneMask[511:256];

endcase

end

endfunction

2.5.6 Pixel ALU-to-SRAM Mask

PaluToSramMask generates the final write per bit mask by bitwise anding the results of WriteEnableMask, PixelAddressMask, EnableMask, and SelectPlaneMask

function [255:0] PaluToSramMask; // Per pixel information input [7:0] WriteEnable; input DualPixel; input [3:0] PixelAddress; input ColorEnable1, ColorEnable0; input DepthEnable1, DepthEnable0; input StencilEnable1, StencilEnable0; // Info from register fields input [2:0] PixelSize; input [15:0] AlphaMask; input [7:0] StencilMask; input [511:0] PlaneMask; begin PaluToSramMask WriteEnableMask(WriteEnable) & PixelAddressMask(DualPixel, PixelAddress, PixelSize) & EnableMask(PixelAddress, ColorEnable1, ColorEnable0, DepthEnable1, DepthEnable0, StencilEnable1, StencilEnable0, PixelSize, DepthMask) & SelectPlaneMask(PixelAddress, PixelSize, PlaneMask) end endfunction

3.0 PIXEL FORMATS

The Dual Pixel 3DRAM chip 110 supports many different pixel formats from 8 bits to 512 bits. Pixel sizes of 8 bits through 32 bits do not support 3-dimensional graphics rendering operations. Pixel sizes of 256 bits and 512 bits support multi-sampled, anti-aliasing operations. Table 24 below lists peak pixel rates for different pixel rates and sizes.

TABLE 24 Peak Pixel Rates for Various Pixel Transfers and Sizes in Mpixels/sec Bits per ML Clear FL Clear pixel Rate Rate 2D Render 3D Render Display  8 12,800 51,200 1600 — 1600  16 6400 25,600 800 — 800  32 3200 12,800 400 — 400  64 1600 6400 400 267-400 400 128 800 3200 400 200-400 267 256 400 1600 200 66.7 200 512 200 800 200 50 200

The pixel capacities of three embodiments of the Dual Pixel 3DRAM device 110 can be found in the Table 25 below, where 1K equal 1024 bits, and 1M equals 1024K or 1,048,576 bits.

TABLE 25 Pixel Capacity by Pixel Size and Device Size Bits per pixel 40 Mbit 80 Mbit 160 Mbit  8 5,242,880 10,485,760 20,971,520  16 2,621,440 5,242,880 10,485,760  32 1,310,720 2,621,440 5,242,880  64 655,360 1,310,720 2,621,440 128 327,680 655,360 1,310,720 256 163,840 327,680 655,360 512 81,920 163,840 327,680

FIGS. 94 through 202 show how the various pixel formats listed in Table 25 are processed in the Dual Pixel 3DRAM chip 110.

3.1 8-Bit Pixel Formats

FIGS. 94-99 show how 8-bit pixels can be processed by the Dual Pixel 3DRAM chip 110. For graphics rendered in 8-bit pixels, display refresh requires 1 byte/pixel, and 2-dimensional writes require 1 byte/pixel.

FIG. 94 shows a suggested display mapping of 8-bit pixels to lines 164 and lines 164 to pages 162.

FIG. 95 shows a suggested cache line organization of 8-bit pixels for the RPIX, SPIX or DPIX operations.

FIG. 96 shows a suggested cache line organization of 8-bit pixels viewed using the RDAT operation.

FIG. 97 shows a suggested format for an 8-bit pixel, where “1” stands for an 8-bit index color which is used to address a 256-bit entry in the SRAM pixel buffer 118. Each entry has 8 bits for red, 8 bits for green and 8 bits for blue. With only 8 bits per pixel, this allows the programmer to select any 256 colors out of a possible 16,777,216 (2²⁴) colors.

FIG. 99 shows how a display refresh operation of 8-bit pixels of the format specified in FIG. 97 requires a 2-cycle RPIX operation to transmit 8 pixels.

3.2 16-Bit Pixel Formats

FIGS. 100-111 show how 16-bit pixels can be processed by the Dual Pixel 3DRAM chip 110. Display refresh requires 2 bytes/pixel. Two-dimensional raster operations require 2 bytes/pixel. 2-dimensional blend operations require 4 bytes/pixel.

FIG. 100 shows a suggested display mapping of 16-bit pixels to lines 164 and lines 164 to pages 162.

FIG. 101 shows a suggested cache line organization of 16-bit pixels for the RPIX, SPIX or DPIX operations.

FIG. 102 shows a suggested cache line organization of 16-bit pixels viewed using the RDAT operation.

FIG. 103 shows the following format for a 16-bit pixel: Alpha: 4, Red: 4, Green: 4, Blue: 4. Each of the alpha, red, green and blue components are represented in 4 bits.

FIG. 105 shows how a display refresh operation requires a 2-cycle RPIX operation to transmit four 16-bit pixels of the format specified in FIG. 103.

FIG. 106 shows the following alternative format for a 16-bit pixel: Red: 5, Green: 6, Blue: 5, where the red component is represented by 5 bits, the green component is represented by 6 bits and the blue component is represented by 5 bits. No alpha component is used in this pixel format.

FIG. 108 shows a display refresh operation which requires a 2-cycle RPIX operation to transmit four 16-bit pixels of the format specified in FIG. 106.

FIG. 109 shows the following alternative format for a 16-bit pixel: Alpha: 1, Red: 5, Green: 5, Blue: 5. The alpha pixel component is represented by 1 bit, and the red, green and blue pixel components are each represented by 5 bits.

FIG. 111 shows a display refresh operation which requires a 2-cycle RPIX operation to transmit four 16-bit pixels of the format specified in FIG. 109.

3.3 32-Bit Pixel Formats

FIGS. 112-120 show how 32-bit pixels can be processed by the Dual Pixel 3DRAM chip 110. Display refresh requires 4 bytes/pixel, and 2-dimensional writes require 4 bytes/pixel.

FIG. 112 shows a suggested display mapping of 32-bit pixels to lines 164 and lines 164 to pages 162.

FIG. 113 shows a suggested cache line organization of 32-bit pixels for the RPIX, SPIX, or DPIX operations.

FIG. 114 shows a suggested cache line organization of 32-bit pixels viewed using RDAT operation.

FIG. 115 shows the following format for a 32-bit pixel: Alpha: 8, Red: 8, Green: 8, Blue: 8. Each of the alpha, red, green and blue pixel components are represented by 8 bits.

FIG. 117 shows how a display refresh operation requires a 2-cycle RPIX operation to transmit two 32-bit pixels of the format specified in FIG. 115.

FIG. 118 shows the following format for a 32-bit pixel: Red: 10, Green: 10, Blue: 10. Each of the red, green and blue pixel components is represented by 10 bits, and there is no alpha component.

FIG. 120 shows how a display refresh operation requires a 2-cycle RPIX operation to transmit two 32-bit pixels of the format specified in FIG. 118.

3.4 64-Bit Pixel Formats

FIGS. 121-147 show how 64-bit pixels can be processed by the Dual Pixel 3DRAM 110. For 2-dimensional fill and display refresh operations, two pixels can be accessed in two cycles.

Display refresh requires four bytes/pixel, 2-dimensional render operations require four bytes/pixel, and 3-dimensional render operations require six bytes/pixel.

FIG. 121 shows a suggested display mapping of 64-bit pixels to lines 164 and lines 164 to pages 162.

FIG. 122 shows a suggested cache line organization of 64-bit pixels for the RPIX, SPIX, or DPIX operations.

FIG. 123 shows a suggested cache line organization of 64-bit pixels viewed using RDAT.

FIG. 124 shows the following format for a 64-bit pixel: WID: 4, Alpha: 8, Red: 8, Green: 8, Blue: 8. Each of the alpha, red, green and blue pixel components are represented by 8 bits, and the Window ID is represented by 4 bits. This format does not support 3-dimensional applications.

FIG. 126 shows how a display refresh operation requires a 2-cycle RPIX operation to transmit two 64-bit pixels of the format specified in FIG. 124.

FIG. 127 shows the following format for a 64-bit pixel: WID: 4, Red: 10, Green: 10, Blue: 10. Each of the alpha, red, green and blue pixel components are represented by 10 bits. This format does not support 3-dimensional applications.

FIG. 129 shows how a display refresh operation requires a 2-cycle RPIX operation to transmit two 64-bit pixels of the format specified in FIG. 127.

FIG. 130 shows the following format for a 64-bit pixel: WID: 4, Depth/Stencil: 28, 2*(Alpha: 4, Red: 4, Green: 4, Blue: 4). This pixel format includes two sets of 4-bit alpha, red, green and blue pixel components, a 28-bit depth/stencil field and a 4-bit window ID field.

FIG. 132 shows that the display refresh sequence requires a 2-cycle RPIX operation to transmit two 64-bit pixels of the format specified in FIG. 130.

FIG. 133 shows the following format for a 64-bit pixel: WID: 4, Overlay: 4, Depth/Stencil: 24, 2*(Alpha: 4, Red: 4, Green: 4, Blue: 4). This pixel format includes two sets of 4-bit alpha, red, green and blue pixel components, a 24-bit depth/stencil field, a 4-bit overlay field and a 4-bit Window ID field.

FIG. 135 shows how a display refresh operation requires a 2-cycle RPIX operation to transmit two 64-bit pixels of the format specified in FIG. 133.

FIG. 136 shows the following format for a 64-bit pixel: WID: 4, Depth/Stencil: 28, 2*(Red: 5, Green: 6, Blue: 5). This pixel format includes two sets of 5-bit red, 6-bit green and 5-bit blue pixel components, a 28-bit depth/stencil field, and a 4-bit Window ID field.

FIG. 138 shows how a display refresh requires a 2-cycle RPIX operation to transmit two 64-bit pixels of the format specified in FIG. 136.

FIG. 139 shows the following format for a 64-bit pixel: WID: 4, Overlay: 4, Depth/Stencil: 24, 2*(Red: 5, Green: 6, Blue: 5). This pixel format includes two sets of 5-bit red, 6-bit green and 5-bit blue pixel component fields, a 24-bit depth/stencil field, a 4-bit overlay field, and a 4-bit Window ID field.

FIG. 141 shows how a display refresh operation requires a 2-cycle RPIX operation to transmit two 64-bit pixels of the format specified in FIG. 139.

FIG. 142 shows the following format for a 64-bit pixel: WID: 4, Depth/Stencil: 28, 2*(Alpha: 1, Red: 5, Green: 5, Blue: 5). This format includes two sets of 5-bit fields for the red, green and blue pixel components, two sets of 1-bit fields for the alpha pixel components, a 28-bit depth/stencil field, and a 4-bit window ID field.

FIG. 144 shows how a display refresh requires a 2-cycle RPIX operation to transmit two 64-bit pixels of the format specified in FIG. 142.

FIG. 145 shows the following format for a 64-bit pixel: WID: 4, Overlay: 4, Depth/Stencil: 24, 2*(Alpha: 1, Red: 5, Green: 5, Blue: 5). This format includes two sets of 5-bit fields for the red, green and blue pixel components, two sets of 1-bit fields for the alpha pixel component, a 24-bit depth/stencil field, a 4-bit overlay field and a 4-bit window ID field.

FIG. 147 shows how a display refresh requires a 2-cycle RPIX operation to transmit two 64-bit pixels having the format specified in FIG. 145.

3.5 96-Bit Pixel Formats

FIGS. 148-168 show how 96-bit pixels can be processed by the Dual Pixel 3DRAM chip 110. In this pixel format, 56 bits of data per pixel are written, and 40 bits per pixel are displayed, which allows for packing of five pixels into eight cycles. Display refresh requires 6.4 bytes/pixel, 2-dimensional render operations require 4 bytes/pixel.

FIG. 148 shows a suggested display mapping of 96-bit pixels to lines 164 and lines 164 to pages 162.

FIG. 149 shows a suggested cache line organization of 96-bit pixels for the RPIX, SPIX, or DPIX operations.

FIG. 150 shows a suggested cache line organization of 96-bit pixels viewed using RDAT.

FIG. 151 shows one format for a 64-bit pixel: WID: 4, Depth/Stencil: 28, 2*(Overlay: 8, Red: 8, Green: 8, Blue: 8). This format includes two sets of 8-bit fields for overlay, red, green and blue pixel components, a 28-bit depth/stencil field, and a 4-bit window ID field.

FIG. 153 shows how a display refresh requires a 3-cycle RPIX operation to transmit two 96-bit pixels having the format specified in FIG. 151 or a 2-cycle RPIX operation to transmit one 96-bit pixel having the format specified in FIG. 151.

FIG. 154 shows the following format for a 96-bit pixel: WID: 4, Depth/Stencil: 28, 2*(Alpha: 8, Red: 8, Green: 8, Blue: 8). This format includes two sets of 8-bit fields for alpha, red, green and blue pixel components, a 28-bit depth/stencil field, and a 4-bit window ID field.

FIG. 156 shows how display refresh of the 96-bit pixel format specified in FIG. 154 requires a 3-cycle RPIX operation to transmit two pixels, or a 2-cycle RPIX operation to transmit one pixel.

FIG. 157 shows the following format for a 96-bit pixel: WID: 4, Overlay: 4, Depth/Stencil: 24, 2*(Alpha: 8, Red: 8, Green: 8, Blue: 8). This format includes two sets of 8-bit fields for alpha, red, green and blue pixel components, a 24-bit depth/stencil field, a 4-bit overlay field and a 4-bit window ID field.

FIG. 159 shows how display refresh of the 96-bit pixel format specified in FIG. 157 requires a 3-cycle RPIX operation to transmit two pixels, or a 2-cycle RPIX operation to transmit one pixel.

FIG. 160 shows the following format for a 96-bit pixel: WID: 4, Depth/Stencil: 28, 2*(Red: 10, Green: 10, Blue: 10). This format includes two sets of 10-bit fields of red, green and blue pixel components, a 28-bit depth/stencil field and a 4-bit window ID field.

FIG. 162 shows how display refresh of the 96-bit pixel format specified in FIG. 160 requires a 3-cycle RPIX operation to transmit two pixels, or a 2-cycle RPIX operation to transmit one pixel.

FIG. 163 shows the following format for a 96-bit pixel: WID: 4, Overlay: 4, Depth/Stencil: 24, 2*(Red: 10, Green: 10, Blue: 10). This format includes two sets of 10-bit fields of red, green and blue pixel components, a 24-bit depth/stencil field, a 4-bit overlay field, and a 4-bit window ID field.

FIG. 165 shows how display refresh of the 96-bit pixel format specified in FIG. 163 requires a 3-cycle RPIX operation to transmit two pixels, or a 2-cycle RPIX operation to transmit one pixel.

FIG. 166 shows the following format for a 96-bit pixel: WID: 4, Overlay: 4, Depth/Stencil: 24, 4*(Alpha: 4, Red: 4, Green: 4, Blue: 4). This format includes four sets of 4-bit fields of alpha, red, green and blue pixel components, a 24-bit depth/stencil field, a 4-bit overlay field, and a 4-bit window ID field.

FIG. 168 shows how display refresh of the 96-bit pixel format specified in FIG. 166 requires a 3-cycle RPIX operation to transmit two pixels, or a 2-cycle RPIX operation to transmit one pixel.

3.6 128-Bit Pixel Formats

FIGS. 169-180 show how 128-bit pixels can be processed by the Dual Pixel 3DRAM chip 110. At this depth, 64 bits per pixel are written, and 48 bits per pixel are displayed so 4 pixels can be packed into 3 cycles. To enhance 2-dimensional performance, pixels may be updated at a rate of 2 pixels per cycle. Display refresh requires 6 bytes/pixel, 2-dimensional render operations require 4 bytes/pixel. Every 128-bit pixel format has an 8-bit WID field at a consistent location.

FIG. 169 shows a suggested display mapping of 128-bit pixels to lines 164 and lines 164 to pages 162.

FIG. 170 shows a suggested cache line organization of 128-bit pixels for the RPIX, SPIX or DPIX operations.

FIG. 171 shows a suggested cache line organization of 128-bit pixels viewed using the RDAT operation.

FIG. 172 shows the following format for a 128-bit pixel: WID: 8, Depth: 32, Stencil: 8, 2*(Overlay: 8, Alpha: 8, Red: 8, Green: 8, Blue: 8). This format includes two sets of 8-bit fields for overlay, alpha, red, green and blue pixel components, an 8-bit stencil field, a 32-bit depth field, and an 8-bit window ID field.

FIG. 174 shows how display refresh of the 128-bit pixel format specified in FIG. 172 requires a 3-cycle RPIX operation to transmit two pixels.

FIG. 175 shows the following format for a 128-bit pixel: WID: 8, Depth: 32, Stencil: 8, 2*(Overlay: 8, Red: 10, Green: 10, Blue: 10). This format includes two sets of 10-bit fields for red, green, and blue pixel components, two sets of 8-bit fields for overlay, an 8-bit stencil field, a 32-bit depth field, and an 8-bit window ID field.

FIG. 177 shows how display refresh of 128-bit pixels having the format specified in FIG. 175 requires a 3-cycle RPIX operation to transmit two pixels.

FIG. 178 shows the following format for a 128-bit pixel: WID: 8, Stencil: 8, Depth: 32, 2*(Alpha: 10, Red: 10, Green: 10, Blue: 10). This format includes two sets of 10-bit fields for alpha, red, green and blue pixel components, a 32-bit depth field, an 8-bit stencil field, and an 8-bit window ID field.

FIG. 180 shows that display refresh of 128-bit pixels having the format specified in FIG. 178 requires a 3-cycle RPIX operation to transmit 2 pixels.

3.7 Multi-Sample Polygon Anti-Aliasing

Pixels having formats of 256 bits or 512 bits support multi-sample polygon anti-aliasing render operations. A discussion of several polygon anti-aliasing algorithms, focusing on their relative advantages, follows:

3.7.1 Accumulation Buffer

This algorithm accumulates multiple aliased images to produce a final anti-aliased image. Each aliased image is rendered with a different subpixel offset in X and Y. The final aliased image is added to the current contents of the accumulation buffer. After all of the aliased images are rendered and accumulated, the pixel components in the accumulation buffer are divided by the number of accumulated images to produce the final anti-aliased image.

The accumulation buffer is a very flexible technique that can accommodate motion blur, depth of field, and soft shadows in addition to polygon anti-aliasing.

While the quality and flexibility of the accumulation buffer are outstanding, this technique takes too much time to produce the final anti-aliased image, and thus may be suitable for high frame rate applications.

A detailed discussion of this technique is provided in the following publication, which is incorporated herein by reference: Haeberli, Paul, K. Akeley, “The Accumulation Buffer: Hardware Support for High-Quality Rendering,” Computer Graphics, Vol. 24, No. 4, August 1990, pp. 309-318.

3.7.2 A buffer

This algorithm maintains a sorted list of polygon fragments for each pixel. If a triangle fully covers a pixel and is fully opaque, all of the fragments behind it can be thrown away. Otherwise, the fragment is inserted into the list at the appropriate place. At a minimum, each fragment has the following components: color, depth, pixelmask, and a pointer to the next fragment. After the entire frame has been rendered, an additional pass is needed to resolve every pixel's fragment list into a final color.

The A buffer algorithm is very good at rendering transparent triangles correctly, even when they are not sorted by depth. The A buffer algorithm is usually poor at handling cases where triangles intersect each other, unless a significant amount of additional information is stored in each fragment. The main disadvantage of the A buffer algorithm is that it requires an unlimited amount of storage and processing per pixel. The frame buffer storage required is roughly proportional to the number of polygons in a frame.

A detailed discussion of this technique is provided in the following publication, which is incorporated herein by reference: Carpenter, Loren, “The A-buffer, an Anti-aliased Hidden Surface Method,” Computer Graphics, Vol. 18, No. 3, July 1984, pp. 103-108.

3.7.3 Multi-sample

Multi-sample anti-aliasing stores several samples per pixel. Each sample is positioned at a different location within or near the pixel. A sample stores either color, or color, depth, and stencil information. When a pixel is rendered, the samples that are inside the triangle are calculated and merged with the samples in the frame buffer. After the entire frame is rendered, a weighted average of all of the sample colors is sent to the display.

FIG. 181 shows two pixels and the locations of each sample within each pixel. Samples within the current triangle are solid, while those outside the triangle are hollow.

Multi-sample anti-aliasing requires a fixed amount of storage per pixel, regardless of the number of triangles rendered per frame. This technique requires almost no API changes for OpenGL or DirectX; all that is needed is some way of enabling or disabling the anti-aliasing feature.

A detailed discussion of this technique is provided in the following publication, which is incorporated herein by reference: Akeley, Kurt, “RealityEngine Graphics,” Computer Graphics, August 1993, pp. 109-116.

3.7.3.1 Only Color Per Sample

In this case, each pixel has storage for WID, stencil, depth, back color, front color, and each sample has storage for color. The rendering controller 102 sends a common pixel color, a common pixel depth, and one bit per sample to indicate whether the sample is inside the triangle or not. Triangle edges are anti-aliased correctly; however triangle intersections will be aliased because the pixel stores only one depth value, as described by the verilog code below.

if WTD test passes { update stencil if stencil and depth tests pass { colorsum = 0 for each sample { if sample is inside triangle merge source color with sample's color colorsum. += sample's color } back color = colorsum / # of samples overwrite depth } }

3.7.3.2 Color and Depth Per Sample

In this case, each pixel has storage for WID, back color, front color, and each sample has storage for color, depth, and stencil. The rendering controller 102 sends a common pixel color, a different depth value per sample, and one bit per sample to indicate whether the sample is inside the triangle or not. Both triangle edges and intersections will be anti-aliased correctly, as described by the verilog code below:

if WID test passes { colorsum = 0 for each sample { if sample is inside triangle { update sample stencil if sample's stencil and depth tests pass { merge source color with sample color overwrite sample depth } } color += sample color } back color = colorsum / # of samples }

3.7.4 Accelerating Color and Depth Per Sample

Depth values are usually calculated as a linear function of X and Y as follows: ${{Depth}\left( {X,Y} \right)} = {{\frac{{Depth}}{X}\quad X} + {\frac{{Depth}}{Y}\quad Y} + {{Depth}\left( {0,0} \right)}}$

The equation can be rewritten in the following form which is more useful: $\begin{matrix} {{{Depth}\left( {{X + {\Delta \quad X}},{Y + {\Delta \quad Y}}} \right)} = \quad {{{Depth}\left( {X,Y} \right)} +}} \\ {\quad {{\frac{{Depth}}{X}\quad \Delta \quad X} + {\frac{{Depth}}{Y}\quad \Delta \quad Y}}} \end{matrix}$

Usually, sample locations within a pixel are located at the same offset in X and Y from the center, corner or a fixed reference point within the pixel, as illustrated in FIG. 182.

If the depth at the center of the pixel (or some other reference point) is known, the depth of sample n can be calculated by: $\begin{matrix} {{{Depth}\left( {{X + {\Delta \quad X_{n}}},{Y + {\Delta \quad Y_{n}}}} \right)} = \quad {{{Depth}\left( {X,Y} \right)} +}} \\ {\quad {{\frac{{Depth}}{X}\quad \Delta \quad X_{n}} + {\frac{{Depth}}{Y}\quad \Delta \quad Y_{n}}}} \end{matrix}$

This calculation can be done in two steps: ${\Delta \quad {Depth}_{n}} = {{\frac{{Depth}}{X}\quad \Delta \quad X_{n}} + {\frac{{Depth}}{Y}\quad \Delta \quad Y_{n}}}$

Depth(X+ΔX_(n), Y+ΔY_(n))=Depth(X, Y)+ΔDepth_(n)

The terms $\frac{{Depth}}{X}$

and $\frac{{Depth}}{Y}$

are the same for all of the pixels in the same triangle. Thus, the ΔDepth_(n) terms are the same for all of the pixels in the same triangle as well.

It is possible to calculate all of the ΔDepth_(n) terms for each sample once per triangle, and transmit them to the Dual Pixel 3DRAM's Pixel ALUs as register writes before rendering the first pixel in the triangle. Then for each pixel in the triangle, only the color and depth value at the center of the pixel (or some other reference point) is transmitted. The depth value at each sample is calculated using:

Depth(X+)X_(n), Y+)Y_(n))=Depth(X, Y)+)Depth_(n). If each sample has a dedicated depth adder, depth comparator, and color blend unit in the Dual Pixel 3DRAM's pixel ALUs, it would be possible to render an entire anti-aliased pixel in one operation. The Dual Pixel 3DRAM chip 110 has such capabilities.

3.8 256-Bit Pixel Formats (4×Multisample)

FIGS. 183-191 show how 256-bit pixels can be processed by the Dual Pixel 3DRAM chip 110. In addition to a 128-bit pixel, the chip 110 can store four subsamples per pixel. To write a pixel, it sends color and depth values, and a 4-bit sample mask. If the Pixel ALUs can process two samples per cycle, the chip 110 can update each pixel in two cycles. While a pixel is being updated, all four sample color values are accumulated and then written to the A or B color buffer.

Multisample antialiasing is easier to implement than A-buffer based antialiasing. Multisample requires a large but finite amount of storage per pixel, a fixed amount of time to update pixels, and does not require a fragment resolve processing stage between rendering a frame and displaying the frame. When the triangle rate is several million per second, most pixels will have partial coverage, and the A-buffer fill rate will go down while fragment storage requirements will increase significantly.

Display refresh requires 8 bytes/pixel, 2-dimensional render requires four bytes/pixel and 3-dimensional render requires 9 bytes/pixel.

Every 256-bit pixel format has an 8-bit WID field at a consistent location. All render formats require two-cycle SPIX or two-cycle DPIX operations. Display refresh requires a two-cycle RPIX operation to transmit one pixel.

FIG. 183 shows a suggested display mapping of 256-bit pixels to lines 164 and lines 164 to pages 162.

FIG. 184 shows a suggested cache line organization of 256-bit pixels for the RPIX, SPIX and DPIX operations.

FIG. 185 shows a suggested cache line organization of 256-bit pixels viewed using the RDAT operation.

FIG. 186 shows one format for a 256-bit pixel: WID: 8, Stencil: 8, Depth: 32, 2* (Overlay: 8, Alpha: 8, Red: 8, Green: 8, Blue: 8), 4*(Alpha: 8, Red: 8, Green: 8, Blue: 8). This format includes 8-bit fields for Window ID and stencil, a 32-bit field for Depth, 2 sets of 8-bit fields of Overlay, Alpha, Red, Green and Blue pixel components, and then four samples of color comprising 8-bit components of Alpha, Red, Green and Blue.

FIG. 188 shows how display refresh of the 256-bit pixel format specified in FIG. 186 requires a 2-cycle RPIX operation to transmit one pixel.

FIG. 190 shows how display refresh of the 256-bit pixel format specified in FIG. 186 requires a 2-cycle RPIX operation to transmit one pixel.

FIG. 191 shows the SRAM read/write format for the 256-bit pixel format.

3.9 512-Bit Pixel formats (6×Multisample)

FIGS. 192-202 show how 512-bit pixels can be processed by the Dual Pixel 3DRAM chip 110. This pixel format supports 6×multi-sampling operations. In this format, 6 sub-samples per pixel are stored in addition to a 128-bit pixel. To write a pixel, a common color value is first transmitted, followed by 6 depth values. If the Pixel ALUs can process two samples per cycle, each pixel can be updated in eight cycles. While a pixel is being updated, all 6 sample color values are accumulated and then written to the A or B color buffer.

Multi-sampled anti-aliasing is easier to implement than A-buffer based anti-aliasing. Multi-sampling requires a large, but finite amount of storage per pixel, a fixed amount of time to update pixels, and does not require a fragment resolve stage between rendering a frame and displaying the frame. The multi-sampling technique anti-aliases interpenetrating surfaces. Enhancing A-buffer to anti-alias interpenetrating surfaces is expensive. When the triangle rate is several million per second, most pixels will have partial coverage, and the A-buffer fill rate will go down, while fragment storage requirements will increase significantly.

Display refresh requires 8 bytes/pixel, 2-dimensional render operations require 4 bytes/pixel, and 3-dimensional render operations require 32 bytes/pixel.

Every 512 bit pixel format has an 8-bit WID field at a consistent location.

FIG. 192 shows a suggested display mapping of 512-bit pixels to lines 164 and lines 164 to pages 162.

FIG. 193 shows a suggested cache line organization of 512-bit pixels for the RPIX, SPIX or DPIX operations.

FIG. 194 shows a suggested cache line organization of 512-bit pixels viewed using the RDAT operation.

FIG. 195 shows one format for a 512-bit pixel: WID: 8, 2*(Overlay: 8, Alpha: 8, Red: 8, Green: 8, Blue: 8), 6*(alpha: 8, Red: 8, Green: 8, Blue: 8, Stencil/Depth: 32). This format includes six samples of the pixel where each sample has 8-bit fields for alpha, red, green and blue pixel components, and a 32-bit field for depth/stencil, two sets of 8-bit fields for overlay, alpha, red, green and blue pixel components, and an 8-bit window ID.

FIG. 197 shows how display refresh of the 512-bit pixel format specified in FIG. 195 requires a 2-cycle RPIX operation to transmit one pixel.

FIG. 198 shows the read format to, and the write format from the SRAM pixel buffer 118 for 512-bit pixels of the format specified in FIG. 195.

FIG. 199 shows the following format for a 512-bit pixel: WID: 8, 2*(Overlay: 8, Red: 10, Green: 10, Blue: 10), 6*(Red: 10, Green: 10, Blue: 10, Stencil/Depth: 32). This format includes six samples of the pixel where each sample has 10-bit fields for red, green and blue pixel components, and a 32-bit field for depth/stencil, two sets of 10-bit fields for red, green and blue pixel components, two sets of an 8-bit field for overlay, and an 8-bit window ID.

FIG. 201 shows how display refresh of the 512-bit pixel format specified in FIG. 199 requires a 2-cycle RPIX operation to transmit one pixel.

FIG. 202 shows the read format to, and the write format from the SRAM pixel buffer 118 for 512-bit pixels of the format specified in FIG. 199.

4.0 BIDIRECTIONAL I/O

Viable implementations of high-speed simultaneous bidirection signalling have recently been implemented. This technology allows data to be transmitted in both directions over a single wire connecting two devices at Gigabit speeds. This section shows how this I/O technology can be applied to Dual Pixel 3DRAM devices to either increase performance or lower cost. A detailed description of the high-speed, simultaneous bidirectional signalling disclosed is presented in the following publication, which is incorporated herein by reference: Haycock, M., Mooney, R., “A 2.5 Gb/s Bidirectional Signaling Technology,” Hot Interconnects Symposium V, August 1997, pp. 149-156.

FIG. 203 illustrates a scheme which improves performance by sending display refresh data over the control/address pins instead of time sharing the data pins. The display refresh path requires a state machine to generate control and address information for fetching display refresh information. The traffic on the data pins will usually be unidirectional.

FIG. 204 illustrates a scheme which allows the pixel ALU to be moved to the rendering controller. The data pins allow for the simultaneous transmission of source and result pixel data. Control/address information and display refresh data share the same set of pins. 

What is claimed is:
 1. A graphics system for operation with a computer, the system comprising: a rendering controller; an interface coupled to the rendering controller and to the computer with which the graphics system operates; a frame buffer memory; a rendering bus coupled to the rendering controller and to the frame buffer memory; and an address and control bus coupled to the rendering controller and to the frame buffer memory, wherein the frame buffer memory comprises a memory array for storing pixel data, a pixel buffer coupled to the memory array, a plurality of pixel arithmetic-logic units coupled to the pixel buffer and coupled to a rendering bus which is external to the frame buffer memory, an input data formatter coupled to the external rendering bus and to the plurality of arithmetic-logic units, an output data formatter coupled to the pixel buffer and to the external rendering bus, a write data formatter coupled to the plurality of pixel arithmetic-logic units and to the pixel buffer, a read data formatter coupled to the pixel buffer and to the plurality of pixel arithmetic-logic units, and an address and control input bus coupled to the memory array, the pixel buffer, the plurality of pixel arithmetic-logic units, the input data formatter, the output data formatter, the write data formatter, the read data formatter and to an address and control bus which is external to the frame buffer memory.
 2. The graphics system of claim 1, wherein the memory array comprises dynamic random access memory.
 3. The graphics system of claim 1, wherein the memory array comprises a plurality of memory banks wherein each memory bank comprises a plurality of memory cells and a plurality of sense amplifiers coupled to access the plurality of memory cells.
 4. The graphics system of claim 3, wherein memory array comprises a column decoder coupled to the sense amplifiers and coupled to the pixel buffer.
 5. The graphics system of claim 3, wherein at least some of the plurality of sense amplifiers are double ended.
 6. The graphics system of claim 1, wherein the memory array comprises a plurality of memory banks, wherein each memory bank comprises a plurality of memory pages, wherein each memory page comprises a plurality of memory lines, and wherein each memory line comprises a plurality of memory cells wherein each memory cell is capable of storing a single bit of pixel data.
 7. The graphics system of claim 6, wherein each of the plurality of memory lines comprises 1024 bits.
 8. The graphics system of claim 6, wherein each of the plurality of memory pages comprises 8 memory lines.
 9. The graphics system of claim 6, wherein each of the plurality of memory banks comprises 512 memory pages.
 10. The graphics system of claim 6, wherein each of the plurality of memory banks comprises 1024 memory pages.
 11. The graphics system of claim 1, wherein the pixel buffer comprises static random access memory.
 12. The graphics system of claim 1, wherein the pixel buffer comprises a plurality of cache lines.
 13. The graphics system of claim 12, wherein the pixel buffer comprises a set of bank and column tags associated with each of the cache lines.
 14. The graphics system of claim 13, wherein the pixel buffer comprises a bank register coupled to the memory array and a column register coupled to the memory array.
 15. The graphics system of claim 1, wherein the pixel buffer comprises a plane mask register, a byte mask register, a read data pipeline register coupled to the memory array, a write data pipeline register coupled to the memory array, and a write mask pipeline register coupled to the memory array.
 16. The graphics system of claim 1, comprising a global bus coupled to the pixel buffer and to the memory array.
 17. The graphics system of claim 16, wherein the global bus is bi-directional.
 18. The graphics system of claim 16, wherein the global bus comprises a read bus, a write bus and a write mask bus.
 19. The graphics system of claim 18, wherein the read bus comprises a read pipeline register coupled to the pixel buffer and to the memory array.
 20. The graphics system of claim 18, wherein the global bus comprises a write pipeline register coupled to the pixel buffer and to the memory array.
 21. The graphics system of claim 18, comprising a mask generator.
 22. The graphics system of claim 21, wherein the write mask bus comprises a write mask pipeline register coupled to the mask generator and to the memory array.
 23. The graphics system of claim 1, wherein each of the plurality pixel arithmetic-logic units comprises a plurality of raster operation units, a plurality of blend units, a depth unit, a stencil unit and a window identification unit.
 24. The graphics system of claim 23, wherein the plurality of raster operation units comprise a raster operation register and a pattern register both of which are coupled to a raster operation processor.
 25. The graphics system of claim 23, wherein each of the plurality of blend units comprises a dither calculation device and two multipliers, each of which is coupled to an adder, which is coupled to a truncating device, which is coupled to a clamping device.
 26. The graphics system of claim 23, wherein the depth unit comprises a mask register coupled to a plurality of logical AND gates which are coupled to a comparator and a function register which is coupled to the comparator.
 27. The graphics system of claim 23, wherein the stencil unit comprises a mask register coupled to a plurality of logical AND gates which are coupled to a comparator, a function register which is coupled to the comparator and a reference register which is coupled to one of the logical AND gates.
 28. The graphics system of claim 23, wherein the stencil unit comprises: a plurality of first stencil operation registers; a depth test multiplexer coupled to the plurality of first stencil operation registers; a stencil test multiplexer coupled to the depth test multiplexer; a second stencil operation register coupled to the stencil test multiplexer; an operation unit coupled to the stencil test multiplexer, and a reference value register coupled to the stencil operation unit.
 29. The graphics system of claim 23, wherein the window identification unit comprises a mask register coupled to a plurality of logical AND gates which are coupled to a comparator, a function register which is coupled to the comparator and a reference register which is coupled to one of the logical AND gates.
 30. The graphics system of claim 1, wherein the plurality of pixel arithmetic-logic units comprise a plurality of raster operation units, a plurality of blend units, a plurality of depth units, a plurality of stencil units and a plurality of window identification units so as to concurrently process pixel data corresponding to a plurality of pixels.
 31. The graphics system of claim 1, wherein the input data formatter comprises a first formatter coupled to an accumulator which is coupled to a second formatter.
 32. The graphics system of claim 1, wherein the output data formatter comprises a mode register coupled to a plurality of window identification data extractors, to a plurality of overlay data selectors and to a plurality of color data selectors.
 33. The graphics system of claim 1, wherein the read data formatter comprises a mode register and a mask, wherein each of the registers is coupled to a plurality of pixel data extractors and to a plurality of pixel data unpackers.
 34. The graphics system of claim 1, wherein the write data formatter comprises a mode register and a mask register, wherein each of the registers is coupled to a plurality of color pack units, to a plurality of depth pack units, and to a plurality of extra pack units.
 35. The graphics system of claim 1, wherein the address and control input bus comprises a decoder coupled to a plurality of address and control channels.
 36. The graphics system of claim 35, wherein the plurality of address and control channels comprise: a pixel arithmetic-logic unit operations channel coupled to the input data formatter, the plurality of pixel arithmetic-logic units, the write data formatter, the pixel buffer, the read data formatter and the output data formatter; a global operations channel coupled to the pixel buffer and the memory array; and a bank operations channel coupled to the memory array.
 37. A graphics system for operation with a computer, the system comprising: a data formatter for a frame buffer memory which is coupled to a controller, the data formatter comprising: a first formatter which extracts a set of pixel difference components from one or more signals that are transmitted from the controller to the data formatter; and an accumulator which calculates a new set of pixel components from the extracted pixel difference components and from a previously stored set of pixel components.
 38. The graphics system of claim 37, comprising a second formatter which formats the new set of pixel components.
 39. The graphics system of claim 37, wherein the accumulator comprises a plurality of accumulator units.
 40. The graphics system of claim 39, wherein the plurality of accumulator units comprise an adder which is coupled to a multiplexer which is coupled to a latch.
 41. The graphics system of claim 37, wherein the second formatter comprises a plurality of formatter units.
 42. A graphics system for operation with a computer, the system comprising: a memory array for storing pixel data, the memory array comprising a plurality of memory banks wherein each memory bank comprises a plurality of memory cells and a plurality of sense amplifiers coupled to access the plurality of memory cells; a pixel buffer coupled to the sense amplifiers of the memory array, the buffer comprising a plurality of cache lines; a plurality of pixel arithmetic-logic units coupled to the pixel buffer and coupled to a rendering bus which is external to the frame buffer memory; an input data formatter coupled to the external rendering bus and to the plurality of arithmetic-logic units; an output data formatter coupled to the pixel buffer and to the external rendering bus; a write data formatter coupled to the plurality of pixel arithmetic-logic units and to the pixel buffer; a read data formatter coupled to the pixel buffer and to the plurality of pixel arithmetic-logic units; and an address and control input bus coupled to the memory array, the pixel buffer, the plurality of pixel arithmetic-logic units, the input data formatter, the output data formatter, the write data formatter, the read data formatter and to an address and control bus which is external to the frame buffer memory.
 43. The graphics system of claim 42, wherein the input data formatter comprises: a first formatter which extracts a set of pixel difference components that are transmitted over the rendering bus to the input data formatter; and an accumulator which calculates a new set of pixel components from the extracted pixel difference components and from a previously stored set of pixel components.
 44. The graphics system of claim 43, comprising a second formatter which formats the new set of pixel components.
 45. The graphics system of claim 42, wherein the memory array comprises dynamic random access memory.
 46. The graphics system of claim 42, wherein memory array comprises a column decoder coupled to the sense amplifiers and coupled to the pixel buffer.
 47. The graphics system of claim 42, wherein each of the plurality of memory banks comprises a plurality of memory pages, wherein each memory page comprises a plurality of memory lines, and wherein each memory line comprises a plurality of memory cells wherein each memory cell is capable of storing a single bit of pixel data.
 48. The graphics system of claim 47, wherein each of the plurality of memory lines comprises 1024 bits.
 49. The graphics system of claim 47, wherein each of the plurality of memory pages comprises 8 memory lines.
 50. The graphics system of claim 47, wherein each of the plurality of memory banks comprises 512 memory pages.
 51. The graphics system of claim 47, wherein each of the plurality of memory banks comprises 1024 memory pages.
 52. The graphics system of claim 47, wherein each of the plurality of pixel arithmetic-logic units comprises a plurality of raster operation units, a plurality of blend units, a plurality of depth units, a plurality of stencil units and a plurality of window identification units so as to be capable to concurrently process pixel data corresponding to a plurality of pixels.
 53. The graphics system of claim 42, wherein at least some of the plurality of sense amplifiers are double ended.
 54. The graphics system of claim 42, wherein the pixel buffer comprises static random access memory.
 55. The graphics system of claim 42, wherein the pixel buffer comprises a plurality of cache lines.
 56. The graphics system of claim 55, wherein the pixel buffer comprises a set of bank and column tags associated with each of the cache lines.
 57. The graphics system of claim 56, wherein the pixel buffer comprises a bank register coupled to the memory array and a column register coupled to the memory array.
 58. The graphics system of claim 42, wherein the pixel buffer comprises a plane mask register, a byte mask register, a read data pipeline register coupled to the memory array, a write data pipeline register coupled to the memory array, and a write mask pipeline register coupled to the memory array.
 59. The graphics system of claim 42, comprising a global bus coupled to the pixel buffer and to the memory array.
 60. The graphics system of claim 59, wherein the global bus is bi-directional.
 61. The graphics system of claim 59, wherein the global bus comprises a read bus, a write bus and a write mask bus.
 62. The graphics system of claim 61, wherein the read bus comprises a read pipeline register coupled to the pixel buffer and to the memory array.
 63. The graphics system of claim 61, wherein the write bus comprises a write pipeline register coupled to the pixel buffer and to the memory array.
 64. The graphics system of claim 61, comprising a mask generator.
 65. The graphics system of claim 64, wherein the write mask bus comprises a write mask pipeline register coupled to the pixel buffer and to the memory array.
 66. The graphics system of claim 42, wherein each of the plurality of pixel arithmetic-logic units comprises a plurality of raster operation units, a plurality of blend units, a depth unit, a stencil unit and a window identification unit.
 67. The graphics system of claim 66, wherein each of the plurality of blend units comprises a dither calculation device and two multipliers, each of which is coupled to an adder, which is coupled to truncating circuitry , which is coupled to clamping circuitry.
 68. The graphics system of claim 42, wherein the input data formatter comprises: a first formatter; and an accumulator coupled to the first formatter.
 69. The graphics system of claim 68, comprising a second formatter coupled to the accumulator.
 70. The graphics system of claim 42, wherein the output data formatter comprises a mode register coupled to a plurality of window identification data extractors, to a plurality of overlay data selectors and to a plurality of color data selectors.
 71. The graphics system of claim 42, wherein the read data formatter comprises a mode register and a mask register, wherein each of the registers is coupled to a plurality of pixel data extractors and to a plurality of pixel data unpackers.
 72. The graphics system of claim 42, wherein the write data formatter comprises a mode register and a mask register, wherein each of the registers is coupled to a plurality of color pack units, to a plurality of depth pack units, and to a plurality of extra pack units.
 73. The graphics system of claim 42, wherein the address and control input bus comprises a decoder coupled to a plurality of address and control channels.
 74. The graphics system of claim 73, wherein the plurality of address and control channels comprise: a pixel arithmetic-logic unit operations channel coupled to the input data formatter, the plurality of pixel arithmetic-logic units, the write data formatter, the pixel buffer, the read data formatter and the output data formatter; a global operations channel coupled to the pixel buffer and the memory array; and a bank operations channel coupled to the memory array. 